mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
rpi test 3 wifi flip on reboot
This commit is contained in:
parent
f3bcabe498
commit
e9aae150f4
2 changed files with 45 additions and 5 deletions
|
@ -8,6 +8,19 @@
|
||||||
- network
|
- network
|
||||||
- network-discover
|
- network-discover
|
||||||
|
|
||||||
|
- include_tasks: hostapd.yml
|
||||||
|
tags:
|
||||||
|
- network
|
||||||
|
- AP
|
||||||
|
|
||||||
|
- name: RPi hack for AP post install via wifi so the services are right
|
||||||
|
set_fact:
|
||||||
|
no_net_restart: True
|
||||||
|
hostapd_enabled: False
|
||||||
|
iiab_wan_iface: discovered_wired_iface
|
||||||
|
iiab_wireless_lan_iface: discovered_wireless_iface
|
||||||
|
when: is_rpi and discovered_wireless_iface is defined and discovered_wireless_iface == iiab_wan_iface
|
||||||
|
|
||||||
- include_tasks: computed_network.yml
|
- include_tasks: computed_network.yml
|
||||||
when: not installing
|
when: not installing
|
||||||
tags:
|
tags:
|
||||||
|
@ -47,11 +60,6 @@
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
||||||
- include_tasks: hostapd.yml
|
|
||||||
tags:
|
|
||||||
- network
|
|
||||||
- AP
|
|
||||||
|
|
||||||
- include_tasks: computed_services.yml
|
- include_tasks: computed_services.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
32
roles/network/templates/hostapd/iiab-hostapd.conf.j2
Normal file
32
roles/network/templates/hostapd/iiab-hostapd.conf.j2
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# Basic configuration
|
||||||
|
|
||||||
|
interface={{ discovered_wireless_iface }}
|
||||||
|
|
||||||
|
ssid={{ host_ssid }}
|
||||||
|
channel={{ host_channel }}
|
||||||
|
{%if iiab_lan_iface == "br0" %}
|
||||||
|
bridge=br0
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
# Hardware configuration
|
||||||
|
driver={{ driver_name }}
|
||||||
|
{%if host_wireless_n %}
|
||||||
|
ieee80211n=1
|
||||||
|
{% endif %}
|
||||||
|
country_code={{ host_country_code }}
|
||||||
|
# limit emissions to what is legal in country
|
||||||
|
ieee80211d=1
|
||||||
|
hw_mode={{ host_wifi_mode }}
|
||||||
|
|
||||||
|
{%if hostapd_secure %}
|
||||||
|
# Use WPA authentication
|
||||||
|
auth_algs=1
|
||||||
|
# Use WPA2
|
||||||
|
wpa=2
|
||||||
|
# Use a pre-shared key
|
||||||
|
wpa_key_mgmt=WPA-PSK
|
||||||
|
# The network passphrase
|
||||||
|
wpa_passphrase={{ hostapd_password }}
|
||||||
|
# Use AES, instead of TKIP
|
||||||
|
rsn_pairwise=CCMP
|
||||||
|
{% endif %}
|
Loading…
Reference in a new issue