[bind] Cache and fix master detection
							parent
							
								
									652dc2456d
								
							
						
					
					
						commit
						c66f2b36af
					
				| 
						 | 
				
			
			@ -13,10 +13,12 @@
 | 
			
		|||
    masters_ipv6: "{{ bind.masters | json_query('servers[].interface[?vlan_id==`2`].ipv6[][].ipv6') }}"
 | 
			
		||||
    slaves_ipv4: "{{ bind.slaves | json_query('servers[].interface[?vlan_id==`2`].ipv4[]') }}"
 | 
			
		||||
    slaves_ipv6: "{{ bind.slaves | json_query('servers[].interface[?vlan_id==`2`].ipv6[][].ipv6') }}"
 | 
			
		||||
    cacheable: true
 | 
			
		||||
 | 
			
		||||
- name: Is this the master?
 | 
			
		||||
  set_fact:
 | 
			
		||||
    is_master: "{{ ansible_all_ipv4_addresses | intersect(masters_ipv4) | bool }}"
 | 
			
		||||
    is_master: "{{ ansible_all_ipv4_addresses | intersect(masters_ipv4) | length > 0 }}"
 | 
			
		||||
    cacheable: true
 | 
			
		||||
 | 
			
		||||
- name: Deploy Bind9 configuration
 | 
			
		||||
  template:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue