From c502144e62940f276501f0eff8854bee262773b2 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Jun 19 2020 21:55:10 +0000 Subject: clevis: adjust tasks to only run on the interface that exists Signed-off-by: Kevin Fenzi --- diff --git a/roles/clevis/tasks/main.yml b/roles/clevis/tasks/main.yml index 88c34fd..71c97d5 100644 --- a/roles/clevis/tasks/main.yml +++ b/roles/clevis/tasks/main.yml @@ -15,9 +15,26 @@ tags: - clevis -- name: enable the systemd unit to wipe dracut networking +- name: enable the systemd unit to wipe dracut networking (br0) systemd: name: flush-dracut-network@{{ br0_dev }} enabled: true + when: br0_dev is defined + tags: + - clevis + +- name: enable the systemd unit to wipe dracut networking (eno1) + systemd: + name: flush-dracut-network@eno1 + enabled: true + when: eno1_ip is defined + tags: + - clevis + +- name: enable the systemd unit to wipe dracut networking (eth0) + systemd: + name: flush-dracut-network@eth0 + enabled: true + when: eth0_ip is defined tags: - clevis