mirror of
				https://gitlab.sectorq.eu/jaydee/ansible.git
				synced 2025-10-30 18:01:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			510 B
		
	
	
	
		
			YAML
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			510 B
		
	
	
	
		
			YAML
		
	
	
		
			Executable File
		
	
	
	
	
| ---
 | |
| - hosts: containers
 | |
|   become: false
 | |
|   gather_facts: true
 | |
|   tasks:
 | |
|     - debug:
 | |
|         msg: play1
 | |
| 
 | |
|     - name: Test
 | |
|       command: nvram get vts_rulelist
 | |
|       when: inventory_hostname in groups['router']
 | |
|       register: result
 | |
| 
 | |
|     - name: Test
 | |
|       command: nvram set vts_rulelist="{{ result.stdout  | replace('192.168.77.106', '192.168.77.246')  }}"
 | |
|       when: inventory_hostname in groups['router']
 | |
| 
 | |
|     - name: Test
 | |
|       command: nvram commit
 | |
|       when: inventory_hostname in groups['router']
 | |
|      | 
