2017-05-27 18:09:50 +00:00
|
|
|
- name: Create a config file for hostapd
|
|
|
|
template: src=hostapd/hostapd.conf.j2
|
|
|
|
dest=/etc/hostapd/hostapd.conf
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|
2017-11-05 18:22:37 +00:00
|
|
|
when: discovered_wireless_iface is defined
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-09-13 14:30:59 +00:00
|
|
|
- name: Disable the Access Point Hostapd program
|
2017-05-27 18:09:50 +00:00
|
|
|
service: enabled=no
|
|
|
|
name=hostapd.service
|
2017-11-05 18:22:37 +00:00
|
|
|
when: not iiab_wireless_lan_iface is defined or iiab_network_mode == "Appliance" or not hostapd_enabled
|
2017-05-27 18:09:50 +00:00
|
|
|
|
|
|
|
- name: Use custom systemd unit file to start hostapd
|
|
|
|
template: src=hostapd/hostapd.service.j2
|
|
|
|
dest=/etc/systemd/system/hostapd.service
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|
|
|
|
|
2017-09-13 14:30:59 +00:00
|
|
|
- name: Enable the Access Point Hostapd program
|
2017-05-27 18:09:50 +00:00
|
|
|
service: enabled=yes
|
|
|
|
name=hostapd.service
|
2017-11-05 18:22:37 +00:00
|
|
|
when: iiab_wireless_lan_iface is defined and iiab_network_mode != "Appliance" and hostapd_enabled
|