mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +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
|
||||
#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 not no_net_restart
|
||||
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 dhcpcd on Raspbian
|
||||
systemd:
|
||||
name: dhcpcd
|
||||
state: restarted
|
||||
when: is_raspbian
|
||||
|
||||
- name: Restart clone-wifi wpa_supplicant service
|
||||
- name: Restart wpa_supplicant dhcpcd on Raspbian
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: restarted
|
||||
with_items:
|
||||
- wpa_supplicant
|
||||
- dhcpcd
|
||||
when: is_raspbian
|
||||
|
||||
- name: Restart wpa_supplicant service on Ubuntu
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: restarted
|
||||
with_items:
|
||||
- clone-wifi
|
||||
- wpa_supplicant
|
||||
when: wifi_up_down and hostapd_enabled and is_ubuntu
|
||||
|
||||
|
|
|
@ -50,13 +50,6 @@
|
|||
systemd:
|
||||
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
|
||||
systemd:
|
||||
name: networking
|
||||
|
|
Loading…
Reference in a new issue