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

1-prep/tasks/internal-wifi.yml: Ansible code touch-ups

This commit is contained in:
root 2022-03-15 19:45:29 -04:00
parent 4a1e5a89ab
commit 566bef36c8

View file

@ -1,5 +1,5 @@
- name: Look for any wireless devices present
shell: "ls -la /sys/class/net/*/phy80211 | cut -d/ -f5"
shell: ls -la /sys/class/net/*/phy80211 | cut -d/ -f5
register: has_wifi_device
ignore_errors: True
changed_when: False
@ -7,9 +7,7 @@
- name: Set internal_wifi, if found
set_fact:
internal_wifi: True
when: has_wifi_device.stdout is defined and item|trim != ""
with_items:
- "{{ has_wifi_device.stdout_lines }}"
when: has_wifi_device is defined and has_wifi_device.stdout | trim != ""
# 2021-07-27 explanation from @jvonau: The 3 BELOW (iw, rfkill, wireless-tools)
# are provided by RasPiOS. Ubuntu|Debian on the other hand are hit or miss: