mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
record bare variables and use -e with the bare variables in the grep line
This commit is contained in:
parent
46448daeab
commit
3d0bdc47e4
1 changed files with 5 additions and 5 deletions
|
@ -106,7 +106,7 @@
|
|||
register: wifi_gateway_found
|
||||
when: discovered_wireless_iface != "none"
|
||||
|
||||
- name: Set has_wifi_gateway for {{ discovered_wireless_iface }} when WiFi gateway has been detected
|
||||
- name: Set has_wifi_gateway if WiFi has default gateway detected for {{ discovered_wireless_iface }}
|
||||
set_fact:
|
||||
has_wifi_gateway: True
|
||||
when: discovered_wireless_iface != "none" and (wifi_gateway_found.stdout|int > 0)
|
||||
|
@ -118,7 +118,7 @@
|
|||
|
||||
- name: Set exclude_devices if default gateway has been detected for {{ second_gateway_found.stdout }}
|
||||
set_fact:
|
||||
exclude_devices: "-e {{ second_gateway_found.stdout }}"
|
||||
exclude_devices: "{{ second_gateway_found.stdout }}"
|
||||
when: second_gateway_found.stdout != ""
|
||||
|
||||
# XO hack here ap_device would not be active therefore not set with
|
||||
|
@ -131,11 +131,11 @@
|
|||
|
||||
- name: Exclude reserved Network Adapter if defined - takes adapter name
|
||||
set_fact:
|
||||
exclude_devices: "-e {{ reserved_device }} {{ exclude_devices }}"
|
||||
exclude_devices: "{{ exclude_devices }} -e {{ reserved_device }}"
|
||||
when: reserved_device is defined
|
||||
|
||||
- name: Count LAN ifaces
|
||||
shell: ls /sys/class/net | grep -v {{ virtual_network_devices }} -e wwlan -e ppp -e {{ device_gw }} {{ exclude_devices }} | wc -l
|
||||
shell: ls /sys/class/net | grep -v {{ virtual_network_devices }} -e wwlan -e ppp -e {{ device_gw }} -e {{ exclude_devices }} | wc -l
|
||||
register: num_lan_interfaces_result
|
||||
|
||||
- name: Calculate number of LAN interfaces including WiFi
|
||||
|
@ -144,7 +144,7 @@
|
|||
|
||||
# LAN - pick non WAN's
|
||||
- name: Create list of LAN (non WAN) ifaces
|
||||
shell: ls /sys/class/net | grep -v {{ virtual_network_devices }} -e wwlan -e ppp -e {{ device_gw }} {{ exclude_devices }}
|
||||
shell: ls /sys/class/net | grep -v {{ virtual_network_devices }} -e wwlan -e ppp -e {{ device_gw }} -e {{ exclude_devices }}
|
||||
when: num_lan_interfaces != "0"
|
||||
register: lan_list_result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue