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

Merge pull request #2769 from jvonau/wifi_info

rename current_host_channel -> current_client_channel and record
This commit is contained in:
A Holt 2021-04-30 12:41:39 -04:00 committed by GitHub
commit bff007e78e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View file

@ -89,3 +89,14 @@
value: "{{ host_wifi_mode }}"
- option: host_channel
value: "{{ host_channel }}"
- name: Add 'network' variable 'current_client_channel' value if defined, to {{ iiab_ini_file }}
ini_file:
dest: "{{ iiab_ini_file }}"
section: network
option: "{{ item.option }}"
value: "{{ item.value | string }}"
with_items:
- option: client_wifi_channel
value: "{{ current_client_channel.stdout }}"
when: current_client_channel.stdout is defined

View file

@ -11,13 +11,13 @@
- name: Detect current Wifi channel
shell: iw {{ discovered_wireless_iface }} info | grep channel | cut -d' ' -f2
register: current_host_channel
register: current_client_channel
when: discovered_wireless_iface != "none"
- name: Setting WiFi channel to {{ current_host_channel.stdout }}
- name: Setting WiFi channel to {{ current_client_channel.stdout }}
set_fact:
host_channel: "{{ current_host_channel.stdout }}"
when: current_host_channel.stdout is defined and current_host_channel.stdout != "" and current_host_channel.stdout|int <= 13
host_channel: "{{ current_client_channel.stdout }}"
when: current_client_channel.stdout is defined and current_client_channel.stdout != "" and current_client_channel.stdout|int <= 13
- name: Create /etc/hostapd/hostapd.conf and backup .iiab from template
template: