mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	Merge pull request #2515 from jvonau/wifi_default
detect secondary gateway on wifi interface for no_net_restart
This commit is contained in:
		
						commit
						a4afb3b08e
					
				
					 2 changed files with 16 additions and 6 deletions
				
			
		|  | @ -145,6 +145,15 @@ | |||
|   with_items: | ||||
|     - "{{ lan_list_result.stdout_lines }}" | ||||
| 
 | ||||
| - name: Detect wifi gateway active | ||||
|   shell: ip r | grep default | grep {{ discovered_wireless_iface }} | wc -l | ||||
|   when: discovered_wireless_iface != "none" | ||||
|   register: wifi_gateway_found | ||||
| 
 | ||||
| - name: Set has_wifi_gateway for {{ discovered_wireless_iface }} if gateway is detected | ||||
|   set_fact: | ||||
|     has_wifi_gateway: True | ||||
|   when: wifi_gateway_found is defined and (wifi_gateway_found.stdout|int > 0) | ||||
| 
 | ||||
| - name: Set iiab_wireless_lan_iface to {{ discovered_wireless_iface }} if not none | ||||
|   set_fact: | ||||
|  |  | |||
|  | @ -6,13 +6,14 @@ | |||
| - name: detected_network | ||||
|   include_tasks: detected_network.yml | ||||
| 
 | ||||
| - name: "Set 'no_net_restart: True' if discovered_wireless_iface == iiab_wan_iface" | ||||
| #- name: "Set 'no_net_restart: True' if discovered_wireless_iface == iiab_wan_iface" | ||||
| - name: "Set 'no_net_restart: True' if has_wifi_gateway is defined" | ||||
|   set_fact: | ||||
|     no_net_restart: True    # 2020-05-09: Var is currently used in 10 files: | ||||
|     # 0-init/defaults/main.yml, network/tasks/main.yml, debian.yml, | ||||
|     # detected_network.yml, down-debian.yml, NM-debian.yml, restart.yml, | ||||
|     # sysd-netd-debian.yml, computed_services.yml, rpi_debian.yml | ||||
|   when: discovered_wireless_iface == iiab_wan_iface | ||||
|     no_net_restart: True    # 2020-09-12: Var is currently used in 11 files... | ||||
|     # 0-init/defaults/main.yml, network/tasks/main.yml, computed_services.yml, | ||||
|     # debian.yml, detected_network.yml, down-debian.yml, netplan.yml, | ||||
|     # NM-debian.yml, restart.yml, rpi_debian.yml, sysd-netd-debian.yml | ||||
|   when: has_wifi_gateway is defined | ||||
| 
 | ||||
| - name: computed_network | ||||
|   include_tasks: computed_network.yml | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue