mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Live w/ red errors to set can_be_ap ('failed_when: False' was too strong)
This commit is contained in:
parent
d1e11fbe54
commit
4ad2622111
1 changed files with 4 additions and 4 deletions
|
@ -108,12 +108,12 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
num_wifi_interfaces: "{{ count_wifi_interfaces.stdout|int }}"
|
num_wifi_interfaces: "{{ count_wifi_interfaces.stdout|int }}"
|
||||||
|
|
||||||
- name: Run 'iw list' to check for Access Point capability
|
- name: Run 'iw list' to check for Access Point capability -- if discovered_wireless_iface != "none"
|
||||||
#command: iw list | grep -v AP: | grep AP | wc -l # False positives 'EAP' etc
|
# shell: iw list | grep -v AP: | grep AP | wc -l # False positives 'EAP' etc
|
||||||
shell: iw list | grep '^[[:space:]]*\* AP$'
|
shell: iw list | grep '^[[:space:]]*\* AP$'
|
||||||
register: look_for_ap
|
register: look_for_ap
|
||||||
when: discovered_wireless_iface != "none"
|
when: discovered_wireless_iface != "none" # Line not nec (but can't hurt?)
|
||||||
failed_when: False # Hides red errors (stronger than 'ignore_errors: yes') -- otherwise Ansible will fail if grep returns '1' on absence of regex!
|
ignore_errors: yes # 'failed_when: False' hides red errors, but is too strong (renders useless the look_for_ap.failed test below!)
|
||||||
|
|
||||||
- name: Set can_be_ap if 'iw list' output contains suitable '* AP'
|
- name: Set can_be_ap if 'iw list' output contains suitable '* AP'
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue