mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
rename current_host_channel -> current_client_channel and record
This commit is contained in:
parent
f578291834
commit
b10f2f9f14
2 changed files with 15 additions and 4 deletions
|
@ -83,3 +83,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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue