This commit is contained in:
parent
8e6aa8e239
commit
4d4b67ef83
@ -109,4 +109,4 @@ systemd_networkd_network: []
|
|||||||
# value: "192.168.178.100"
|
# value: "192.168.178.100"
|
||||||
# filename: "50-wireguard.network"
|
# filename: "50-wireguard.network"
|
||||||
|
|
||||||
systemd_timesyncd_timezone: Europe/Berlin
|
systemd_timesyncd_timezone: Europe/Berlin
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: restart networkd
|
- name: restart networkd
|
||||||
systemd:
|
ansible.builtin.systemd:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
@ -16,9 +16,9 @@ galaxy_info:
|
|||||||
versions:
|
versions:
|
||||||
- "35"
|
- "35"
|
||||||
|
|
||||||
galaxy_tags:
|
# galaxy_tags:
|
||||||
- systemd-networkd
|
# - systemd-networkd
|
||||||
- wiregurd
|
# - wiregurd
|
||||||
- resolvectl
|
# - resolvectl
|
||||||
|
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Include OS-specific variables
|
- name: Include OS-specific variables
|
||||||
include_vars: "{{ ansible_os_family }}.yml"
|
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
- name: "Remove existing systemd-networkd configuration"
|
- name: "Remove existing systemd-networkd configuration"
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "/etc/systemd/network"
|
path: "/etc/systemd/network"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: "Create systemd-networkd directory"
|
- name: "Create systemd-networkd directory"
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "/etc/systemd/network"
|
path: "/etc/systemd/network"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@ -19,7 +19,7 @@
|
|||||||
- name: Create systemd.netdev files
|
- name: Create systemd.netdev files
|
||||||
block:
|
block:
|
||||||
- name: Create systemd.netdev files
|
- name: Create systemd.netdev files
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: systemd.netdev.j2
|
src: systemd.netdev.j2
|
||||||
dest: "/etc/systemd/network/{{ item.filename }}"
|
dest: "/etc/systemd/network/{{ item.filename }}"
|
||||||
owner: "{{ systemd_networkd_unix_user }}"
|
owner: "{{ systemd_networkd_unix_user }}"
|
||||||
@ -31,7 +31,7 @@
|
|||||||
with_items: "{{ systemd_networkd_netdev }}"
|
with_items: "{{ systemd_networkd_netdev }}"
|
||||||
|
|
||||||
- name: Create sensitive systemd.netdev files
|
- name: Create sensitive systemd.netdev files
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: systemd.netdev.j2
|
src: systemd.netdev.j2
|
||||||
dest: "/etc/systemd/network/{{ item.filename }}"
|
dest: "/etc/systemd/network/{{ item.filename }}"
|
||||||
owner: "{{ systemd_networkd_unix_user }}"
|
owner: "{{ systemd_networkd_unix_user }}"
|
||||||
@ -45,7 +45,7 @@
|
|||||||
notify: restart networkd
|
notify: restart networkd
|
||||||
|
|
||||||
- name: Create systemd.networkd files
|
- name: Create systemd.networkd files
|
||||||
template:
|
ansible.builtin.tempansible.builtin.file:
|
||||||
src: systemd.network.j2
|
src: systemd.network.j2
|
||||||
dest: "/etc/systemd/network/{{ item.filename }}"
|
dest: "/etc/systemd/network/{{ item.filename }}"
|
||||||
owner: "{{ systemd_networkd_unix_user }}"
|
owner: "{{ systemd_networkd_unix_user }}"
|
||||||
@ -55,36 +55,36 @@
|
|||||||
notify: restart networkd
|
notify: restart networkd
|
||||||
|
|
||||||
- name: Create symlink to use systemd-resolved's stub-listener
|
- name: Create symlink to use systemd-resolved's stub-listener
|
||||||
file:
|
ansible.builtin.file:
|
||||||
src: /run/systemd/resolve/stub-resolv.conf
|
src: /run/systemd/resolve/stub-resolv.conf
|
||||||
dest: /etc/resolv.conf
|
dest: /etc/resolv.conf
|
||||||
state: link
|
state: link
|
||||||
force: yes
|
force: true
|
||||||
follow: no
|
follow: false
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
||||||
- name: Start and enable systemd-networkd
|
- name: Start and enable systemd-networkd
|
||||||
service:
|
ansible.builtin.systemd:
|
||||||
name: systemd-networkd
|
name: systemd-networkd
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
|
|
||||||
- name: Start and enable systemd-resolved
|
- name: Start and enable systemd-resolved
|
||||||
service:
|
ansible.builtin.systemd:
|
||||||
name: systemd-resolved
|
name: systemd-resolved
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
|
|
||||||
- name: Set system timezone
|
- name: Set system timezone
|
||||||
timezone:
|
community.general.timezone:
|
||||||
name: "{{ systemd_timesyncd_timezone }}"
|
name: "{{ systemd_timesyncd_timezone }}"
|
||||||
|
|
||||||
- name: Start and enable systemd-timesyncd
|
- name: Start and enable systemd-timesyncd
|
||||||
service:
|
ansible.builtin.systemd:
|
||||||
name: systemd-timesyncd
|
name: systemd-timesyncd
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
systemd_networkd_unix_user: systemd-network
|
systemd_networkd_unix_user: systemd-network
|
||||||
systemd_networkd_unix_group: systemd-network
|
systemd_networkd_unix_group: systemd-network
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
systemd_networkd_unix_user: systemd-network
|
systemd_networkd_unix_user: systemd-network
|
||||||
systemd_networkd_unix_group: systemd-network
|
systemd_networkd_unix_group: systemd-network
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
systemd_networkd_unix_user: systemd-network
|
systemd_networkd_unix_user: systemd-network
|
||||||
systemd_networkd_unix_group: systemd-network
|
systemd_networkd_unix_group: systemd-network
|
||||||
|
|
||||||
systemd_networkd_package_names: []
|
systemd_networkd_package_names: []
|
||||||
|
Loading…
Reference in New Issue
Block a user