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:
commit
bff007e78e
2 changed files with 15 additions and 4 deletions
|
@ -89,3 +89,14 @@
|
||||||
value: "{{ host_wifi_mode }}"
|
value: "{{ host_wifi_mode }}"
|
||||||
- option: host_channel
|
- option: host_channel
|
||||||
value: "{{ 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
|
- name: Detect current Wifi channel
|
||||||
shell: iw {{ discovered_wireless_iface }} info | grep channel | cut -d' ' -f2
|
shell: iw {{ discovered_wireless_iface }} info | grep channel | cut -d' ' -f2
|
||||||
register: current_host_channel
|
register: current_client_channel
|
||||||
when: discovered_wireless_iface != "none"
|
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:
|
set_fact:
|
||||||
host_channel: "{{ current_host_channel.stdout }}"
|
host_channel: "{{ current_client_channel.stdout }}"
|
||||||
when: current_host_channel.stdout is defined and current_host_channel.stdout != "" and current_host_channel.stdout|int <= 13
|
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
|
- name: Create /etc/hostapd/hostapd.conf and backup .iiab from template
|
||||||
template:
|
template:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue