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

network exclude ap0

This commit is contained in:
Jerry Vonau 2020-03-19 05:59:21 -05:00
parent 0ca3bac427
commit 17c69eca74
2 changed files with 12 additions and 12 deletions

View file

@ -109,13 +109,13 @@
# make it so number 2 vars should use user_wan_iface but we can cover a single
# wired if dhcp fails the interface should revert to LAN, static address should
# stick around but testing gateway response is not performed.
- name: User wants single wired interface as static or dhcp gateway
set_fact:
user_wan_iface: "{{ discovered_wan_iface }}" # Jan 2018: Holt discovered_lan_iface was UNDEFINED on WiFi-installed
# RPi (when re-running ./iiab-network) so "discovered_wan_iface" is a
# workaround -- please see https://github.com/iiab/iiab/pull/649
# This workaround can and should evolve as IIAB 6.5 matures!
when: num_lan_interfaces == "1" and user_lan_iface == "auto" and user_wan_iface == "auto"
#- name: User wants single wired interface as static or dhcp gateway
# set_fact:
# user_wan_iface: "{{ discovered_wan_iface }}" # Jan 2018: Holt discovered_lan_iface was UNDEFINED on WiFi-installed
# # RPi (when re-running ./iiab-network) so "discovered_wan_iface" is a
# # workaround -- please see https://github.com/iiab/iiab/pull/649
# # This workaround can and should evolve as IIAB 6.5 matures!
# when: num_lan_interfaces == "1" and user_lan_iface == "auto" and user_wan_iface == "auto"
- name: Use old gateway device info if not detected and using static ip
set_fact:
@ -152,14 +152,14 @@
- name: We're hosed no work interfaces
set_fact:
iiab_network_mode: "No_network_found"
when: adapter_count.stdout|int == "0"
when: adapter_count.stdout|int == 0
# well if there ever was a point to tell the user things are FUBAR this is it.
- name: I'm not guessing declare gateway please
set_fact:
iiab_network_mode: "Undetectable_use_local_vars"
iiab_wan_iface: "none"
when: adapter_count.stdout|int >= "5" and device_gw == "none" and gui_wan_iface == "unset" and gui_static_wan is defined
when: adapter_count.stdout|int >= 5 and device_gw == "none" and gui_wan_iface == "unset" and gui_static_wan is defined
- name: Record IIAB_WAN_DEVICE to {{ iiab_env_file }}
lineinfile:

View file

@ -75,7 +75,7 @@
set_fact:
wifi2: "{{ item|trim }}"
discovered_wireless_iface: "{{ item|trim }}"
when: wireless_list2.stdout is defined
when: wireless_list2.stdout is defined and not wireless_list2.stdout == "ap0"
with_items:
- "{{ wireless_list2.stdout_lines }}"
#item|trim != discovered_wan_iface
@ -103,7 +103,7 @@
when: reserved_wifi is defined and discovered_wireless_iface != iiab_wan_iface and num_wifi_interfaces >= "2"
- name: Count LAN ifaces
shell: ls /sys/class/net | grep -v -e wwlan -e ppp -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth -e {{ device_gw }} -e {{ ap_device }} | wc -l
shell: ls /sys/class/net | grep -v -e ap0 -e wwlan -e ppp -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth -e {{ device_gw }} -e {{ ap_device }} | wc -l
register: num_lan_interfaces_result
- name: Calculate number of LAN interfaces including WiFi
@ -112,7 +112,7 @@
# LAN - pick non WAN's
- name: Create list of LAN (non WAN) ifaces
shell: ls /sys/class/net | grep -v -e wwlan -e ppp -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth -e {{ device_gw }} -e {{ ap_device }}
shell: ls /sys/class/net | grep -v -e ap0 -e wwlan -e ppp -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth -e {{ device_gw }} -e {{ ap_device }}
when: num_lan_interfaces != "0"
register: lan_list_result