To reuse alpine and nginx roles. Probably going to merge repos at some point.
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			511 B
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			511 B
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
| {% set nodes = query('netbox.netbox.nb_lookup', 'devices', api_filter='role=firewall', raw_data=true)
 | |
|     | selectattr('config_context') | selectattr('config_context', 'contains', 'master')
 | |
|     | selectattr('config_context.master', '==', inventory_hostname)
 | |
|     | map(attribute='name') -%}
 | |
| 
 | |
| {
 | |
| {% for node in nodes %}
 | |
|   "{{ hostvars[node] | device_address | selectattr('family.value', '==', 4)
 | |
|           | map(attribute='address') | ipaddr('address') | first }}": -1{{ '' if loop.last else ',' }}
 | |
| {% endfor %}
 | |
| }
 |