From e0a6247f23cf0863993df610507eb827b6ffe691 Mon Sep 17 00:00:00 2001 From: Ilja Rotar <77339620+iljarotar@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:16:58 +0100 Subject: [PATCH] reboot mgmtserver if interfaces were not renamed successfully (#346) --- partition/roles/systemd-networkd/tasks/main.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/partition/roles/systemd-networkd/tasks/main.yaml b/partition/roles/systemd-networkd/tasks/main.yaml index 84ff34f3..a14d9a86 100644 --- a/partition/roles/systemd-networkd/tasks/main.yaml +++ b/partition/roles/systemd-networkd/tasks/main.yaml @@ -52,6 +52,13 @@ loop_control: index_var: i +- name: Update ansible facts + setup: + +- name: Reboot if interfaces were not renamed successfully + reboot: + when: "(systemd_networkd_nics | map(attribute='name')) is not subset(ansible_facts.interfaces)" + - name: Render systemd-networkd vlan netdev config template: src: vlan.netdev.j2