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

should be a drop-in replacement

This commit is contained in:
Jerry Vonau 2022-04-15 19:28:58 -05:00
parent dfb9eea05d
commit 9f699d19fe

View file

@ -28,14 +28,14 @@
- name: Set country code for hostapd to value found in /etc/wpa_supplicant/wpa_supplicant.conf - name: Set country code for hostapd to value found in /etc/wpa_supplicant/wpa_supplicant.conf
set_fact: set_fact:
host_country_code: "{{ country_code.stdout }}" host_country_code: "{{ country_code.stdout }}"
when: country_code is defined and country_code.stdout != "" when: country_code is defined and country_code.stdout | length > 0
- name: Put country code ({{ host_country_code }}) in /etc/wpa_supplicant/wpa_supplicant.conf if nec - name: Put country code ({{ host_country_code }}) in /etc/wpa_supplicant/wpa_supplicant.conf if nec
lineinfile: lineinfile:
path: /etc/wpa_supplicant/wpa_supplicant.conf path: /etc/wpa_supplicant/wpa_supplicant.conf
regexp: "^country.*" regexp: "^country.*"
line: country={{ host_country_code }} line: country={{ host_country_code }}
when: country_code is defined and country_code.stdout == "" when: country_code is defined and country_code.stdout | length = 0
- name: Enable the WiFi with rfkill - name: Enable the WiFi with rfkill
shell: rfkill unblock 0 shell: rfkill unblock 0