mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
runtime - move clone-wifi - adjust services
This commit is contained in:
parent
933ca564bd
commit
8190f4b7a9
2 changed files with 16 additions and 16 deletions
|
@ -1,28 +1,35 @@
|
||||||
|
- name: Clone wifi if needed
|
||||||
|
systemd:
|
||||||
|
name: clone-wifi
|
||||||
|
state: started
|
||||||
|
|
||||||
#hostapd_enabled False - set in hostapd.yml to avoid the enable with wifi_up_down False
|
#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
|
#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
|
- name: Restart hostapd when WiFi is present but not when using WiFi as gateway with wifi_up_down False
|
||||||
systemd:
|
systemd:
|
||||||
name: hostapd
|
name: hostapd
|
||||||
state: restarted
|
state: restarted
|
||||||
when: hostapd_enabled and not no_net_restart
|
when: hostapd_enabled and (wifi_up_down or not no_net_restart)
|
||||||
|
|
||||||
- name: Stop wpa_supplicant on Raspbian
|
- name: Stop wpa_supplicant on Raspbian
|
||||||
shell: killall wpa_supplicant
|
shell: killall wpa_supplicant
|
||||||
when: is_raspbian
|
when: is_raspbian
|
||||||
|
|
||||||
# now pick up denyinterfaces and respawn wpa_supplicant
|
# now pick up denyinterfaces and respawn wpa_supplicant
|
||||||
- name: Restart dhcpcd on Raspbian
|
- name: Restart wpa_supplicant dhcpcd on Raspbian
|
||||||
systemd:
|
systemd:
|
||||||
name: dhcpcd
|
name: "{{ item }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
when: is_raspbian
|
with_items:
|
||||||
|
- wpa_supplicant
|
||||||
- name: Restart clone-wifi wpa_supplicant service
|
- dhcpcd
|
||||||
|
when: is_raspbian
|
||||||
|
|
||||||
|
- name: Restart wpa_supplicant service on Ubuntu
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
with_items:
|
with_items:
|
||||||
- clone-wifi
|
|
||||||
- wpa_supplicant
|
- wpa_supplicant
|
||||||
when: wifi_up_down and hostapd_enabled and is_ubuntu
|
when: wifi_up_down and hostapd_enabled and is_ubuntu
|
||||||
|
|
||||||
|
|
|
@ -50,13 +50,6 @@
|
||||||
systemd:
|
systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
|
|
||||||
- name: Clone wifi if needed
|
|
||||||
systemd:
|
|
||||||
name: clone-wifi
|
|
||||||
state: started
|
|
||||||
when: not no_net_restart
|
|
||||||
# might be able to pull off wifi with the staging in restart.yml
|
|
||||||
|
|
||||||
- name: Restart the networking service if appropriate
|
- name: Restart the networking service if appropriate
|
||||||
systemd:
|
systemd:
|
||||||
name: networking
|
name: networking
|
||||||
|
|
Loading…
Reference in a new issue