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
|
- name: restart hostapd when wifi is present
|
||||||
service: name=hostapd state=restarted
|
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
|
#- name: dhcp_server may be affected - starting - user choice
|
||||||
# service: name={{ dhcp_service2 }} state=started
|
# service: name={{ dhcp_service2 }} state=started
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=0644
|
mode=0644
|
||||||
when: iiab_wireless_lan_iface != "none"
|
when: discovered_wireless_iface is defined
|
||||||
|
|
||||||
- name: Disable the Access Point Hostapd program
|
- name: Disable the Access Point Hostapd program
|
||||||
service: enabled=no
|
service: enabled=no
|
||||||
name=hostapd.service
|
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
|
- name: Use custom systemd unit file to start hostapd
|
||||||
template: src=hostapd/hostapd.service.j2
|
template: src=hostapd/hostapd.service.j2
|
||||||
|
@ -21,4 +21,4 @@
|
||||||
- name: Enable the Access Point Hostapd program
|
- name: Enable the Access Point Hostapd program
|
||||||
service: enabled=yes
|
service: enabled=yes
|
||||||
name=hostapd.service
|
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
|
#- name: restart hostapd when wifi is present
|
||||||
service: name=hostapd state=started
|
# service: name=hostapd state=started
|
||||||
when: iiab_wireless_lan_iface != "none" and hostapd_enabled
|
# when: iiab_wireless_lan_iface is defined and hostapd_enabled
|
||||||
|
|
||||||
- name: Start named service
|
- name: Start named service
|
||||||
service: name={{ dns_service }}
|
service: name={{ dns_service }}
|
||||||
|
@ -50,13 +50,13 @@
|
||||||
|
|
||||||
- name: Checking if wifi slave is active waiting {{ hostapd_wait }} seconds
|
- name: Checking if wifi slave is active waiting {{ hostapd_wait }} seconds
|
||||||
shell: brctl show br0 | grep {{ iiab_wireless_lan_iface }}
|
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
|
register: wifi_slave
|
||||||
|
|
||||||
- name: Restart hostapd if wifi slave is inactive
|
- name: Restart hostapd if wifi slave is inactive
|
||||||
service: name=hostapd.service
|
service: name=hostapd.service
|
||||||
state=restarted
|
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
|
- name: dhcp_server may be affected - starting - user choice
|
||||||
service: name={{ dhcp_service2 }}
|
service: name={{ dhcp_service2 }}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Basic configuration
|
# Basic configuration
|
||||||
|
|
||||||
interface={{ iiab_wireless_lan_iface }}
|
interface={% if iiab_wireless_lan_iface is defined %} {{ iiab_wireless_lan_iface }} {% endif %}
|
||||||
ssid={{ host_ssid }}
|
ssid={{ host_ssid }}
|
||||||
channel={{ host_channel }}
|
channel={{ host_channel }}
|
||||||
{%if iiab_lan_iface == "br0" %}
|
{%if iiab_lan_iface == "br0" %}
|
||||||
|
@ -28,4 +28,4 @@ wpa_key_mgmt=WPA-PSK
|
||||||
wpa_passphrase={{ hostapd_password }}
|
wpa_passphrase={{ hostapd_password }}
|
||||||
# Use AES, instead of TKIP
|
# Use AES, instead of TKIP
|
||||||
rsn_pairwise=CCMP
|
rsn_pairwise=CCMP
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue