## DISCOVER PLATFORMS ###### # Put conditional actions for hardware platforms here - name: Look for any wireless devices present shell: "ls -la /sys/class/net/*/phy80211 | awk -F / '{print $5}'" register: has_wifi_device ignore_errors: True changed_when: False - name: Set has_wireless, if found set_fact: has_wireless: True when: has_wifi_device.stdout is defined and item|trim != "" with_items: - "{{ has_wifi_device.stdout_lines }}" - include_tasks: wifi.yml when: has_wireless is defined - include_tasks: raspberry_pi.yml when: first_run and rpi_model != "none" - name: Check if the identifier for Intel's NUC6 built-in WiFi is present shell: "lsusb | grep 8087:0a2b | wc | awk '{print $1}'" register: usb_NUC6 ignore_errors: True - name: Download {{ iiab_download_url }}/iwlwifi-8000C-13.ucode to /lib/firmware for built-in WiFi on NUC6 # iiab_download_url is http://download.iiab.io/packages get_url: url: "{{ iiab_download_url }}/iwlwifi-8000C-13.ucode" dest: /lib/firmware timeout: "{{ download_timeout }}" when: usb_NUC6.stdout|int > 0