1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

network/tasks/detected_network.yml: Refine AP detection

This commit is contained in:
root 2022-05-18 23:48:54 -04:00
parent fb1e5a3bc4
commit 4d5143e2de

View file

@ -101,15 +101,16 @@
set_fact: set_fact:
num_wifi_interfaces: "{{ count_wifi_interfaces.stdout|int }}" num_wifi_interfaces: "{{ count_wifi_interfaces.stdout|int }}"
- name: Check for Access Point capablility with 'iw list' - name: Run 'iw list' to check for Access Point capability
command: iw list | grep -v AP: | grep AP | wc -l #command: iw list | grep -v AP: | grep AP | wc -l # False positives 'EAP' etc
shell: iw list | grep '^[[:space:]]*\* AP$'
register: look_for_ap register: look_for_ap
when: discovered_wireless_iface != "none" when: discovered_wireless_iface != "none"
- name: Setting can_be_ap - name: Set can_be_ap if 'iw list' output contains suitable '* AP'
set_fact: set_fact:
can_be_ap: True can_be_ap: True
when: look_for_ap.stdout|int != 0 when: look_for_ap is defined and not look_for_ap.failed
- name: Detect wifi gateway active - name: Detect wifi gateway active
shell: ip r | grep default | grep {{ discovered_wireless_iface }} | wc -l shell: ip r | grep default | grep {{ discovered_wireless_iface }} | wc -l