1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/network/tasks/hostapd.yml
2017-11-20 11:20:20 -06:00

47 lines
1.4 KiB
YAML

- name: Create a config file for hostapd
template: src=hostapd/hostapd.conf.j2
dest=/etc/hostapd/hostapd.conf
owner=root
group=root
mode=0644
when: iiab_wireless_lan_iface is defined
- name: Create a config template for hostapd
template: src=hostapd/iiab-hostapd.conf.j2
dest=/etc/hostapd/hostapd.conf.template
owner=root
group=root
mode=0644
when: discovered_wireless_iface is defined
- name: Disable the Access Point 'hostapd' service
service: enabled=no
name=hostapd.service
when: not hostapd_enabled
- name: Use custom systemd unit file to start 'hostapd' service
template: src=hostapd/hostapd.service.j2
dest=/etc/systemd/system/hostapd.service
owner=root
group=root
mode=0644
when: hostapd_enabled
- name: Use custom iiab-hotspot-on
template: src=network/iiab-hotspot-on
dest=/usr/bin/iiab-hotspot-on
owner=root
group=root
mode=0755
- name: Use custom iiab-hotspot-off
template: src=network/iiab-hotspot-off
dest=/usr/bin/iiab-hotspot-off
owner=root
group=root
mode=0755
- name: Enable the Access Point 'hostapd' service
service: enabled=yes
name=hostapd.service
when: iiab_wireless_lan_iface is defined and iiab_network_mode != "Appliance" and hostapd_enabled