1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

detect secondary gateway on wifi interface for no_net_restart

This commit is contained in:
Jerry Vonau 2020-09-12 02:33:31 +01:00
parent 8ab73eaf2e
commit 05600f3b7a
2 changed files with 10 additions and 1 deletions

View file

@ -145,6 +145,15 @@
with_items:
- "{{ lan_list_result.stdout_lines }}"
- name: Detect wifi gateway active
shell: ip r | grep default | grep {{ discovered_wireless_iface }} | wc -l
when: discovered_wireless_iface != "none"
register: wifi_gateway_found
- name: Set has_wifi_gateway for {{ discovered_wireless_iface }} if gateway is detected
set_fact:
has_wifi_gateway: True
when: wifi_gateway_found is defined and (wifi_gateway_found.stdout|int > 0)
- name: Set iiab_wireless_lan_iface to {{ discovered_wireless_iface }} if not none
set_fact:

View file

@ -12,7 +12,7 @@
# 0-init/defaults/main.yml, network/tasks/main.yml, debian.yml,
# detected_network.yml, down-debian.yml, NM-debian.yml, restart.yml,
# sysd-netd-debian.yml, computed_services.yml, rpi_debian.yml
when: discovered_wireless_iface == iiab_wan_iface
when: has_wifi_gateway is defined
- name: computed_network
include_tasks: computed_network.yml