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

Everybody is testing debian.yml - Toggle dnsmasq_enabled False - edits

use hostapd.yml supplied templates sooner - remove systemd reload and restarted - move restarted to restart.yml

live testing
This commit is contained in:
Jerry Vonau 2017-09-13 09:30:59 -05:00
parent fcb0488502
commit de4be7c646
7 changed files with 116 additions and 61 deletions

View file

@ -6,10 +6,9 @@
mode=0644
when: iiab_wireless_lan_iface != "none"
- name: Disable the Access Point hostapd program
- name: Disable the Access Point Hostapd program
service: enabled=no
name=hostapd.service
state=stopped
when: iiab_wireless_lan_iface == "none" or iiab_network_mode == "Appliance" or not hostapd_enabled
- name: Use custom systemd unit file to start hostapd
@ -19,26 +18,7 @@
group=root
mode=0644
- name: Ask systemd to reread the unit files for hostapd
shell: systemctl daemon-reload
- name: Enable the Access Point hostapd program
- name: Enable the Access Point Hostapd program
service: enabled=yes
name=hostapd.service
state=restarted
when: iiab_wireless_lan_iface != "none" and iiab_network_mode != "Appliance" and hostapd_enabled
- name: Checking if slave is active waiting 10 seconds
shell: "sleep {{ hostapd_wait }} | brctl show | grep {{ iiab_wireless_lan_iface }}"
ignore_errors: True
changed_when: False
register: wifi_slave
when: iiab_lan_iface == "br0" and iiab_wireless_lan_iface != "none"
- name: Restart hostapd if slave is inactive
service: name=hostapd.service
state=restarted
when: is_debuntu and iiab_lan_iface == "br0" and item|trim == ""
with_items:
- "{{ wifi_slave.stdout }}"
ignore_errors: true

View file

@ -109,23 +109,17 @@
tags:
- network
- include: ifcfg_mods.yml
- include: hostapd.yml
tags:
- network
- include: ifcfg_mods.yml
when: not is_debuntu and not installing
tags:
- network
when: is_redhat and not installing
- include: debian.yml
tags:
- network
when: is_debuntu and not is_rpi and not installing
- include: rpi_debian.yml
tags:
- network
when: is_debuntu and is_rpi and not installing
- include: hostapd.yml
when: not installing
when: is_debuntu and not installing
tags:
- network

View file

@ -40,3 +40,18 @@
- name: Run iptables
command: /usr/bin/iiab-gen-iptables
- name: Checking if slave is active waiting 10 seconds
shell: "sleep {{ hostapd_wait }} | brctl show | grep {{ iiab_wireless_lan_iface }}"
ignore_errors: True
changed_when: False
register: wifi_slave
when: iiab_lan_iface == "br0" and iiab_wireless_lan_iface != "none"
- name: Restart hostapd if slave is inactive
service: name=hostapd.service
state=restarted
when: iiab_lan_iface == "br0" and item|trim == ""
with_items:
- "{{ wifi_slave.stdout }}"
ignore_errors: true