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

rework logic to correct recording of hostapd state

This commit is contained in:
Jerry Vonau 2019-08-15 06:09:22 -05:00
parent 5e50d3ca1f
commit c0c8b4e984

View file

@ -1,3 +1,8 @@
- name: Turn off hostapd when no wifi interface present or in "Appliance Mode"
set_fact:
hostapd_enabled: False
when: not iiab_wireless_lan_iface is defined or iiab_network_mode == "Appliance"
- name: Create /etc/hostapd/hostapd.conf from template
template:
src: hostapd/hostapd.conf.j2
@ -5,9 +10,9 @@
owner: root
group: root
mode: 0644
when: iiab_wireless_lan_iface is defined
when: hostapd_enabled
- name: Create /etc/hostapd/hostapd.conf.iiab from template
- name: Create backup /etc/hostapd/hostapd.conf.iiab from template
template:
src: hostapd/iiab-hostapd.conf.j2
dest: /etc/hostapd/hostapd.conf.iiab
@ -53,7 +58,7 @@
systemd:
name: hostapd
enabled: yes
when: hostapd_enabled and iiab_wireless_lan_iface is defined and iiab_network_mode != "Appliance"
when: hostapd_enabled
- name: Record HOSTAPD_ENABLED to {{ iiab_env_file }}
lineinfile: