mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
rpi wifi-runtime changes
This commit is contained in:
parent
52c0f2aaea
commit
a95d476287
3 changed files with 33 additions and 31 deletions
|
@ -1,37 +1,10 @@
|
||||||
- name: Clone wifi if needed
|
- name: Restart wpa_supplicant service
|
||||||
systemd:
|
|
||||||
name: clone-wifi
|
|
||||||
state: started
|
|
||||||
|
|
||||||
#hostapd_enabled False - set in hostapd.yml to avoid the enable with wifi_up_down False
|
|
||||||
#no_net_restart: True - main.yml discovered_wireless_iface == iiab_wan_iface
|
|
||||||
- name: Restart hostapd when WiFi is present but not when using WiFi as gateway with wifi_up_down False
|
|
||||||
systemd:
|
|
||||||
name: hostapd
|
|
||||||
state: restarted
|
|
||||||
when: hostapd_enabled and (wifi_up_down or not no_net_restart)
|
|
||||||
|
|
||||||
- name: Stop wpa_supplicant on Raspbian
|
|
||||||
shell: killall wpa_supplicant
|
|
||||||
when: is_raspbian
|
|
||||||
|
|
||||||
# now pick up denyinterfaces and respawn wpa_supplicant
|
|
||||||
- name: Restart wpa_supplicant dhcpcd on Raspbian
|
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
with_items:
|
with_items:
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
- dhcpcd
|
when: wifi_up_down and hostapd_enabled
|
||||||
when: is_raspbian
|
|
||||||
|
|
||||||
- name: Restart wpa_supplicant service on Ubuntu
|
|
||||||
systemd:
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: restarted
|
|
||||||
with_items:
|
|
||||||
- wpa_supplicant
|
|
||||||
when: wifi_up_down and hostapd_enabled and is_ubuntu
|
|
||||||
|
|
||||||
- name: Reload netplan for Wifi gateway on Ubuntu 18+
|
- name: Reload netplan for Wifi gateway on Ubuntu 18+
|
||||||
shell: netplan apply
|
shell: netplan apply
|
||||||
|
|
|
@ -50,10 +50,28 @@
|
||||||
systemd:
|
systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
|
|
||||||
|
- name: Clone wifi if needed
|
||||||
|
systemd:
|
||||||
|
name: clone-wifi
|
||||||
|
state: started
|
||||||
|
|
||||||
- name: Restart the networking service if appropriate
|
- name: Restart the networking service if appropriate
|
||||||
systemd:
|
systemd:
|
||||||
name: networking
|
name: networking
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
when: not nobridge is defined # less is better
|
|
||||||
#when: not nobridge is defined and not no_net_restart
|
- name: Restart hostapd when WiFi is present but not when using WiFi as gateway$
|
||||||
|
systemd:
|
||||||
|
name: hostapd
|
||||||
|
state: restarted
|
||||||
|
when: hostapd_enabled and (wifi_up_down or not no_net_restart)
|
||||||
|
|
||||||
|
- name: Stop wpa_supplicant on Raspbian
|
||||||
|
shell: killall wpa_supplicant
|
||||||
|
|
||||||
|
# now pick up denyinterfaces and respawn wpa_supplicant
|
||||||
|
- name: Restart dhcpcd on Raspbian
|
||||||
|
systemd:
|
||||||
|
name: dhcpcd
|
||||||
|
state: restarted
|
||||||
|
|
|
@ -51,7 +51,18 @@
|
||||||
systemd:
|
systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
|
|
||||||
|
- name: Clone wifi if needed
|
||||||
|
systemd:
|
||||||
|
name: clone-wifi
|
||||||
|
state: started
|
||||||
|
|
||||||
- name: Restart the systemd-networkd service
|
- name: Restart the systemd-networkd service
|
||||||
systemd:
|
systemd:
|
||||||
name: systemd-networkd
|
name: systemd-networkd
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: Restart hostapd when WiFi is present but not when using WiFi as gateway$
|
||||||
|
systemd:
|
||||||
|
name: hostapd
|
||||||
|
state: restarted
|
||||||
|
when: hostapd_enabled and (wifi_up_down or not no_net_restart)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue