Skip to content

Commit

Permalink
reboot mgmtserver if interfaces were not renamed successfully (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
iljarotar authored Nov 6, 2024
1 parent 537d8cd commit e0a6247
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions partition/roles/systemd-networkd/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0a6247

Please sign in to comment.