mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
commit
7543e8fbb2
1 changed files with 10 additions and 4 deletions
|
@ -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
|
- name: Create /etc/hostapd/hostapd.conf from template
|
||||||
template:
|
template:
|
||||||
src: hostapd/hostapd.conf.j2
|
src: hostapd/hostapd.conf.j2
|
||||||
|
@ -5,16 +10,16 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: iiab_wireless_lan_iface is defined
|
when: discovered_wireless_iface != "none"
|
||||||
|
|
||||||
- name: Create /etc/hostapd/hostapd.conf.iiab from template
|
- name: Create backup /etc/hostapd/hostapd.conf.iiab from template
|
||||||
template:
|
template:
|
||||||
src: hostapd/iiab-hostapd.conf.j2
|
src: hostapd/iiab-hostapd.conf.j2
|
||||||
dest: /etc/hostapd/hostapd.conf.iiab
|
dest: /etc/hostapd/hostapd.conf.iiab
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: discovered_wireless_iface is defined
|
when: discovered_wireless_iface != "none"
|
||||||
|
|
||||||
- name: Use custom systemd unit file to start 'hostapd' service
|
- name: Use custom systemd unit file to start 'hostapd' service
|
||||||
template:
|
template:
|
||||||
|
@ -23,6 +28,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
when: discovered_wireless_iface != "none"
|
||||||
|
|
||||||
- name: Create /usr/bin/iiab-hotspot-on from template
|
- name: Create /usr/bin/iiab-hotspot-on from template
|
||||||
template:
|
template:
|
||||||
|
@ -53,7 +59,7 @@
|
||||||
systemd:
|
systemd:
|
||||||
name: hostapd
|
name: hostapd
|
||||||
enabled: yes
|
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 }}
|
- name: Record HOSTAPD_ENABLED to {{ iiab_env_file }}
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue