[bind] Cache and fix master detection

certbot_on_virtu
Alexandre Iooss 2020-04-26 22:51:48 +02:00
parent 652dc2456d
commit c66f2b36af
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
1 changed files with 3 additions and 1 deletions

View File

@ -13,10 +13,12 @@
masters_ipv6: "{{ bind.masters | json_query('servers[].interface[?vlan_id==`2`].ipv6[][].ipv6') }}" 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_ipv4: "{{ bind.slaves | json_query('servers[].interface[?vlan_id==`2`].ipv4[]') }}"
slaves_ipv6: "{{ bind.slaves | json_query('servers[].interface[?vlan_id==`2`].ipv6[][].ipv6') }}" slaves_ipv6: "{{ bind.slaves | json_query('servers[].interface[?vlan_id==`2`].ipv6[][].ipv6') }}"
cacheable: true
- name: Is this the master? - name: Is this the master?
set_fact: 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 - name: Deploy Bind9 configuration
template: template: