mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	move channel detection also
This commit is contained in:
		
							parent
							
								
									9391d37f40
								
							
						
					
					
						commit
						fa8cc5637e
					
				
					 2 changed files with 16 additions and 16 deletions
				
			
		|  | @ -250,6 +250,11 @@ | |||
|     host_country_code: "{{ REG_DOM.stdout }}" | ||||
|   when: REG_DOM.stdout is defined and REG_DOM.stdout | length > 0 | ||||
| 
 | ||||
| - name: Detect current Wifi channel | ||||
|   shell: iw {{ discovered_wireless_iface }} info | grep channel | cut -d' ' -f2 | ||||
|   register: current_client_channel | ||||
|   when: wifi_up_down and can_be_ap and has_wifi_gateway is defined | ||||
| 
 | ||||
| - name: In VM disable LAN - needs local_vars entry to activate | ||||
|   set_fact: | ||||
|     iiab_lan_iface: none | ||||
|  | @ -309,6 +314,17 @@ | |||
|     - option: host_country_code_found | ||||
|       value: "{{ host_country_code }}" | ||||
| 
 | ||||
| - name: Add 'detected_network' variable 'current_client_channel_found' value if defined, to {{ iiab_ini_file }} | ||||
|   ini_file: | ||||
|     dest: "{{ iiab_ini_file }}" | ||||
|     section: detected_network | ||||
|     option: "{{ item.option }}" | ||||
|     value: "{{ item.value | string }}" | ||||
|   with_items: | ||||
|     - option: client_wifi_channel_found | ||||
|       value: "{{ current_client_channel.stdout }}" | ||||
|   when: current_client_channel.stdout is defined | ||||
| 
 | ||||
| # well if there ever was a point to tell the user things are FUBAR this is it. | ||||
| # limit 2 network adapters wifi wired | ||||
| - name: I'm not guessing declare gateway please | ||||
|  |  | |||
|  | @ -9,11 +9,6 @@ | |||
|     enabled: no | ||||
|   when: not hostapd_enabled | ||||
| 
 | ||||
| - name: Detect current Wifi channel | ||||
|   shell: iw {{ discovered_wireless_iface }} info | grep channel | cut -d' ' -f2 | ||||
|   register: current_client_channel | ||||
|   when: wifi_up_down and can_be_ap and has_wifi_gateway is defined | ||||
| 
 | ||||
| - name: Setting WiFi channel to {{ current_client_channel.stdout }} | ||||
|   set_fact: | ||||
|     host_channel: "{{ current_client_channel.stdout }}" | ||||
|  | @ -120,14 +115,3 @@ | |||
|       value: "{{ host_country_code }}" | ||||
|     - 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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue