From 9f6857f6029178ea5e16a98a17f2118e28176fee Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Sat, 18 Aug 2018 17:36:50 -0500 Subject: [PATCH] Add async to the networkd start task The async function was added to the restart handler but not the start task. This change adds the missing async which will ensure we're not hung on transient networkd starts. Change-Id: I81a9e578875a43f7581abec0a3bf0c4067ab4d41 Signed-off-by: Kevin Carter --- handlers/main.yml | 8 +++++++- tasks/main.yml | 6 ++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index e4fb632..e1935cf 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Restart systemd-networkd +- name: Restart networkd systemd: name: "systemd-networkd" state: restarted @@ -22,9 +22,15 @@ poll: 0 when: - systemd_run_networkd | bool + listen: Restart systemd-networkd tags: - systemd-networkd +- name: (RE)Gather facts post setup + setup: + gather_subset: "network" + listen: Restart systemd-networkd + - name: Restart systemd-resolved systemd: name: "systemd-resolved" diff --git a/tasks/main.yml b/tasks/main.yml index 19e07c5..54edbb6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -130,11 +130,9 @@ name: "systemd-networkd" enabled: "yes" state: started + async: 45 + poll: 0 when: - systemd_run_networkd | bool tags: - systemd-networkd - -- name: (RE)Gather facts post setup - setup: - gather_subset: "network"