From 75162642ad3fbe3d43102b9134c9c1ffbde0029e Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sun, 12 Apr 2020 17:53:26 +0100 Subject: [PATCH] suppose iiab-wifi should be absent when not wifi_up_down --- roles/network/tasks/hostapd.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/roles/network/tasks/hostapd.yml b/roles/network/tasks/hostapd.yml index 75cd0f564..0cd9a2d5d 100644 --- a/roles/network/tasks/hostapd.yml +++ b/roles/network/tasks/hostapd.yml @@ -114,7 +114,16 @@ with_items: - { src: 'hostapd/netd-disp', dest: '/etc/networkd-dispatcher/carrier.d/iiab-wifi' } - { src: 'hostapd/netd-disp', dest: '/etc/networkd-dispatcher/no-carrier.d/iiab-wifi' } - when: systemd_networkd_active and discovered_wireless_iface != "none" and rpi_model != "none" + when: systemd_networkd_active and discovered_wireless_iface != "none" and rpi_model != "none" and wifi_up_down + +- name: Remove networkd-dispatcher hook for hostapd on RPi hardware and not up/down + file: + path: "{{ item.dest}} + status: absent + with_items: + - { src: 'hostapd/netd-disp', dest: '/etc/networkd-dispatcher/carrier.d/iiab-wifi' } + - { src: 'hostapd/netd-disp', dest: '/etc/networkd-dispatcher/no-carrier.d/iiab-wifi' } + when: systemd_networkd_active and discovered_wireless_iface != "none" and rpi_model != "none" and not wifi_up_down - name: Disable the Access Point 'hostapd' service systemd: