fix systemd-networkd role not reloading systemd-networkd
This commit is contained in:
parent
1f670f8039
commit
eaf330a269
2 changed files with 5 additions and 0 deletions
3
roles/systemd_networkd/handlers/main.yaml
Normal file
3
roles/systemd_networkd/handlers/main.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
- name: "reload systemd-networkd"
|
||||||
|
become: true
|
||||||
|
ansible.builtin.command: "networkctl reload"
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: synchronize systemd-networkd configs
|
- name: synchronize systemd-networkd configs
|
||||||
|
notify: "reload systemd-networkd"
|
||||||
ansible.posix.synchronize:
|
ansible.posix.synchronize:
|
||||||
src: "{{ systemd_networkd__config_dir }}"
|
src: "{{ systemd_networkd__config_dir }}"
|
||||||
dest: "/etc/systemd/network"
|
dest: "/etc/systemd/network"
|
||||||
|
|
@ -23,6 +24,7 @@
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: ensure global systemd-networkd config is deployed
|
- name: ensure global systemd-networkd config is deployed
|
||||||
|
notify: "reload systemd-networkd"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ systemd_networkd__global_config }}"
|
content: "{{ systemd_networkd__global_config }}"
|
||||||
dest: "/etc/systemd/networkd.conf.d/20-ansible.conf"
|
dest: "/etc/systemd/networkd.conf.d/20-ansible.conf"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue