mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
hostapd.yml: enable/restart svc if manually_toggle_AP is false
This commit is contained in:
parent
3a1d9e2657
commit
2ba4737aba
1 changed files with 38 additions and 30 deletions
|
@ -1,47 +1,55 @@
|
||||||
- name: Create /etc/hostapd/hostapd.conf from template
|
- name: Create /etc/hostapd/hostapd.conf from template
|
||||||
template: src=hostapd/hostapd.conf.j2
|
template:
|
||||||
dest=/etc/hostapd/hostapd.conf
|
src: hostapd/hostapd.conf.j2
|
||||||
owner=root
|
dest: /etc/hostapd/hostapd.conf
|
||||||
group=root
|
owner: root
|
||||||
mode=0644
|
group: root
|
||||||
|
mode: 0644
|
||||||
when: iiab_wireless_lan_iface is defined
|
when: iiab_wireless_lan_iface is defined
|
||||||
|
|
||||||
- name: Create /etc/hostapd/hostapd.conf.iiab from template
|
- name: Create /etc/hostapd/hostapd.conf.iiab from template
|
||||||
template: src=hostapd/iiab-hostapd.conf.j2
|
template:
|
||||||
dest=/etc/hostapd/hostapd.conf.iiab
|
src: hostapd/iiab-hostapd.conf.j2
|
||||||
owner=root
|
dest: /etc/hostapd/hostapd.conf.iiab
|
||||||
group=root
|
owner: root
|
||||||
mode=0644
|
group: root
|
||||||
|
mode: 0644
|
||||||
when: discovered_wireless_iface is defined
|
when: discovered_wireless_iface is defined
|
||||||
|
|
||||||
- name: Disable the Access Point 'hostapd' service
|
- name: Disable the Access Point 'hostapd' service
|
||||||
service: enabled=no
|
service:
|
||||||
name=hostapd.service
|
enabled: no
|
||||||
|
name: hostapd.service
|
||||||
when: not hostapd_enabled
|
when: not hostapd_enabled
|
||||||
|
|
||||||
- name: Use custom systemd unit file to start 'hostapd' service
|
- name: Use custom systemd unit file to start 'hostapd' service
|
||||||
template: src=hostapd/hostapd.service.j2
|
template:
|
||||||
dest=/etc/systemd/system/hostapd.service
|
src: hostapd/hostapd.service.j2
|
||||||
owner=root
|
dest: /etc/systemd/system/hostapd.service
|
||||||
group=root
|
owner: root
|
||||||
mode=0644
|
group: root
|
||||||
|
mode: 0644
|
||||||
when: hostapd_enabled
|
when: hostapd_enabled
|
||||||
|
|
||||||
- name: Create /usr/bin/iiab-hotspot-on from template
|
- name: Create /usr/bin/iiab-hotspot-on from template
|
||||||
template: src=network/iiab-hotspot-on
|
template:
|
||||||
dest=/usr/bin/iiab-hotspot-on
|
src: network/iiab-hotspot-on
|
||||||
owner=root
|
dest: /usr/bin/iiab-hotspot-on
|
||||||
group=root
|
owner: root
|
||||||
mode=0755
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
- name: Create /usr/bin/iiab-hotspot-off from template
|
- name: Create /usr/bin/iiab-hotspot-off from template
|
||||||
template: src=network/iiab-hotspot-off
|
template:
|
||||||
dest=/usr/bin/iiab-hotspot-off
|
src: network/iiab-hotspot-off
|
||||||
owner=root
|
dest: /usr/bin/iiab-hotspot-off
|
||||||
group=root
|
owner: root
|
||||||
mode=0755
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
- name: Enable the Access Point 'hostapd' service
|
- name: Enable the Access Point 'hostapd' service
|
||||||
service: enabled=yes
|
service:
|
||||||
name=hostapd.service
|
# enabled: yes
|
||||||
when: iiab_wireless_lan_iface is defined and iiab_network_mode != "Appliance" and hostapd_enabled
|
state: restarted
|
||||||
|
name: hostapd.service
|
||||||
|
when: hostapd_enabled and not manually_toggle_AP and iiab_wireless_lan_iface is defined and iiab_network_mode != "Appliance"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue