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

use 'iw reg get' in hostapd if present

This commit is contained in:
Jerry Vonau 2023-04-16 05:23:42 -05:00
parent bb95816c79
commit 2f321dc0a4

View file

@ -87,6 +87,17 @@
systemd:
daemon_reload: yes
- name: Detect WiFi country code in use
command: iw reg get | grep country | grep -v UNSET | awk '{print $2}' | sed "s|:||"
register: REG_DOM
ignore_errors: True
when: discovered_wireless_iface != "none"
- name: Set Wifi Region country code for hostapd when present
set_fact:
host_country_code: "{{ REG_DOM }}"
when: REG_DOM is defined and REG_DOM.stdout | length > 0
- name: Clone wifi if needed
systemd:
name: iiab-clone-wifi