20 lines
		
	
	
		
			519 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			519 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| ---
 | |
| - name: Disable /etc/network/interfaces for {{ if_item.ifname }}
 | |
|   become: true
 | |
|   find:
 | |
|     paths: /etc/network/interfaces.d/,/etc/network
 | |
|     contains: 'iface {{ if_item.ifname }}($|\s)'
 | |
|   register: network_files
 | |
| - name: Comment static {{ if_item.ifname }} config
 | |
|   become: true
 | |
|   replace:
 | |
|     path: "{{ f_item.path }}"
 | |
|     regexp: '^(?!#)'
 | |
|     replace: '#'
 | |
|   loop: "{{ network_files.files }}"
 | |
|   loop_control:
 | |
|     loop_var: f_item
 | |
| 
 | |
| #  notify: 
 | |
| #    - networking changed
 | |
| #    - network-manager configuration changed |