Update role so we're not reloading the daemon in excess

The systemd-networkd role was reloading the systemd daemon on every run
this change removes that as this role will not need to modify anything
that requires a daemon reload.

Network facts will be gathered after this role executes which will
ensure any state changes are picked up as soon as they're available.

Change-Id: Ib3efa6a1662da48d0f58e00ed77f725e1a950edb
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-05-18 22:16:02 -05:00
parent 1cb76ab4ca
commit b6a4cfe946
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3
2 changed files with 8 additions and 17 deletions

View File

@ -16,7 +16,6 @@
- name: Restart systemd-networkd
systemd:
name: "systemd-networkd"
daemon_reload: yes
state: restarted
when:
- systemd_run_networkd | bool
@ -26,7 +25,6 @@
- name: Restart systemd-resolved
systemd:
name: "systemd-resolved"
daemon_reload: yes
state: restarted
when:
- systemd_resolved_available | bool

View File

@ -123,26 +123,19 @@
tags:
- systemd-networkd
- name: Reload systemd daemon
systemd:
daemon_reload: yes
tags:
- systemd-networkd
- name: Enable systemd-networkd
- name: Enable and start systemd-networkd
systemd:
name: "systemd-networkd"
enabled: "yes"
state: started
when:
- systemd_run_networkd | bool
tags:
- systemd-networkd
- name: Start systemd daemon
systemd:
name: "systemd-networkd"
state: "started"
when:
- systemd_run_networkd | bool
tags:
- systemd-networkd
- name: Force all notified handlers now
meta: flush_handlers
- name: (RE)Gather facts post setup
setup:
gather_subset: "network"