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

replace second_gateway_found.changed with second_gateway_found.stdout != and wording

This commit is contained in:
Jerry Vonau 2020-10-07 13:59:16 -05:00
parent 3f060118ca
commit 46448daeab

View file

@ -106,19 +106,20 @@
register: wifi_gateway_found
when: discovered_wireless_iface != "none"
- name: Set has_wifi_gateway for {{ discovered_wireless_iface }} if WiFi gateway is detected
- name: Set has_wifi_gateway for {{ discovered_wireless_iface }} when WiFi gateway has been detected
set_fact:
has_wifi_gateway: True
when: discovered_wireless_iface != "none" and (wifi_gateway_found.stdout|int > 0)
- name: Detect secondary gateway active
- name: Detect secondary gateway active on all interfaces
shell: ip r | grep default | grep -v {{ discovered_wan_iface }} | awk '{print $5}'
register: second_gateway_found
changed_when: False
- name: Set exclude_devices for {{ second_gateway_found.stdout }} if gateway is detected
- name: Set exclude_devices if default gateway has been detected for {{ second_gateway_found.stdout }}
set_fact:
exclude_devices: "-e {{ second_gateway_found.stdout }}"
when: second_gateway_found.changed
when: second_gateway_found.stdout != ""
# XO hack here ap_device would not be active therefore not set with
# wired as gw use ap_device to exclude eth0 from network calulations