1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

tighten up hostapd check

This commit is contained in:
Jerry Vonau 2017-10-15 20:33:12 -05:00
parent c1a272cd90
commit b17bc7f779

View file

@ -43,15 +43,12 @@
- name: Checking if wifi slave is active waiting {{ hostapd_wait }} seconds
shell: "sleep {{ hostapd_wait }} | brctl show br0 | grep {{ iiab_wireless_lan_iface }}"
ignore_errors: True
changed_when: False
register: wifi_slave
when: iiab_lan_iface == "br0" and iiab_wireless_lan_iface != "none"
register: wifi_slave
- name: Restart hostapd if wifi slave is inactive
service: name=hostapd.service
state=restarted
when: iiab_lan_iface == "br0" and item|trim == ""
when: iiab_wireless_lan_iface != "none" and hostapd_enabled and item|trim == ""
with_items:
- "{{ wifi_slave.stdout }}"
ignore_errors: true