mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
iiab_wireless_lan_iface is defined for machines without wifi
This commit is contained in:
parent
78a9434122
commit
35cd2b44a5
4 changed files with 11 additions and 11 deletions
|
@ -71,7 +71,7 @@
|
|||
|
||||
- name: restart hostapd when wifi is present
|
||||
service: name=hostapd state=restarted
|
||||
when: iiab_wireless_lan_iface != "none" and hostapd_enabled and iiab_network_mode != "Appliance"
|
||||
when: iiab_wireless_lan_iface is defined and hostapd_enabled and iiab_network_mode != "Appliance"
|
||||
|
||||
#- name: dhcp_server may be affected - starting - user choice
|
||||
# service: name={{ dhcp_service2 }} state=started
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
when: iiab_wireless_lan_iface != "none"
|
||||
when: discovered_wireless_iface is defined
|
||||
|
||||
- name: Disable the Access Point Hostapd program
|
||||
service: enabled=no
|
||||
name=hostapd.service
|
||||
when: iiab_wireless_lan_iface == "none" or iiab_network_mode == "Appliance" or not hostapd_enabled
|
||||
when: not iiab_wireless_lan_iface is defined or iiab_network_mode == "Appliance" or not hostapd_enabled
|
||||
|
||||
- name: Use custom systemd unit file to start hostapd
|
||||
template: src=hostapd/hostapd.service.j2
|
||||
|
@ -21,4 +21,4 @@
|
|||
- name: Enable the Access Point Hostapd program
|
||||
service: enabled=yes
|
||||
name=hostapd.service
|
||||
when: iiab_wireless_lan_iface != "none" and iiab_network_mode != "Appliance" and hostapd_enabled
|
||||
when: iiab_wireless_lan_iface is defined and iiab_network_mode != "Appliance" and hostapd_enabled
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- name: restart hostapd when wifi is present
|
||||
service: name=hostapd state=started
|
||||
when: iiab_wireless_lan_iface != "none" and hostapd_enabled
|
||||
#- name: restart hostapd when wifi is present
|
||||
# service: name=hostapd state=started
|
||||
# when: iiab_wireless_lan_iface is defined and hostapd_enabled
|
||||
|
||||
- name: Start named service
|
||||
service: name={{ dns_service }}
|
||||
|
@ -50,13 +50,13 @@
|
|||
|
||||
- name: Checking if wifi slave is active waiting {{ hostapd_wait }} seconds
|
||||
shell: brctl show br0 | grep {{ iiab_wireless_lan_iface }}
|
||||
when: iiab_wireless_lan_iface != "none" and iiab_lan_iface == "br0" and hostapd_enabled
|
||||
when: iiab_wireless_lan_iface is defined and iiab_lan_iface == "br0" and hostapd_enabled
|
||||
register: wifi_slave
|
||||
|
||||
- name: Restart hostapd if wifi slave is inactive
|
||||
service: name=hostapd.service
|
||||
state=restarted
|
||||
when: iiab_wireless_lan_iface != "none" and iiab_lan_iface == "br0" and hostapd_enabled
|
||||
when: iiab_wireless_lan_iface is defined and iiab_lan_iface == "br0" and hostapd_enabled
|
||||
|
||||
- name: dhcp_server may be affected - starting - user choice
|
||||
service: name={{ dhcp_service2 }}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Basic configuration
|
||||
|
||||
interface={{ iiab_wireless_lan_iface }}
|
||||
interface={% if iiab_wireless_lan_iface is defined %} {{ iiab_wireless_lan_iface }} {% endif %}
|
||||
ssid={{ host_ssid }}
|
||||
channel={{ host_channel }}
|
||||
{%if iiab_lan_iface == "br0" %}
|
||||
|
@ -28,4 +28,4 @@ wpa_key_mgmt=WPA-PSK
|
|||
wpa_passphrase={{ hostapd_password }}
|
||||
# Use AES, instead of TKIP
|
||||
rsn_pairwise=CCMP
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue