Make updaters zone key optional
This commit is contained in:
parent
7cdd070ad4
commit
eab820a60a
1 changed files with 7 additions and 4 deletions
|
@ -24,7 +24,7 @@ log:
|
|||
#
|
||||
|
||||
key:
|
||||
{% for remote in ( (zones | map(attribute='replicas') ) + (zones | map(attribute='masters') ) + (zones | map(attribute='updaters') ) ) | flatten | unique %}
|
||||
{% for remote in ( (zones | map(attribute='replicas') ) + (zones | map(attribute='masters') ) + (zones | map(attribute='updaters', default=[]) ) ) | flatten | unique %}
|
||||
|
||||
- id: {{ hostvars[remote].knot_tsig_key.name }}
|
||||
algorithm: {{ hostvars[remote].knot_tsig_key.algorithm }}
|
||||
|
@ -33,7 +33,7 @@ key:
|
|||
|
||||
|
||||
remote:
|
||||
{% for remote in ( (zones | map(attribute='replicas') ) + (zones | map(attribute='masters') ) + (zones | map(attribute='updaters') ) ) | flatten | unique %}
|
||||
{% for remote in ( (zones | map(attribute='replicas') ) + (zones | map(attribute='masters') ) + (zones | map(attribute='updaters', default=[]) ) ) | flatten | unique %}
|
||||
|
||||
- id: remote-{{ remote }}
|
||||
{% for address in hostvars[remote].knot_dns_addresses %}
|
||||
|
@ -68,7 +68,7 @@ acl:
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for remote in zones | map(attribute='updaters') | flatten | unique %}
|
||||
{% for remote in zones | map(attribute='updaters', default=[]) | flatten | unique %}
|
||||
|
||||
- id: acl-update-{{ remote }}
|
||||
action: update
|
||||
|
@ -108,6 +108,9 @@ zone:
|
|||
{% for replica in zone.replicas %}
|
||||
acl: acl-xfr-{{ replica }}
|
||||
{% endfor %}
|
||||
{% for updater in zone.updaters | default([]) %}
|
||||
acl: acl-update-{{ updater }}
|
||||
{% endfor %}
|
||||
{% for replica in zone.replicas %}
|
||||
notify: remote-{{ replica }}
|
||||
{% endfor %}
|
||||
|
@ -127,7 +130,7 @@ zone:
|
|||
storage: {{ knot_zone_replica_storage_path }}
|
||||
serial-policy: unixtime
|
||||
{% for master in zone.masters %}
|
||||
acl: acl-xfr-{{ master }}
|
||||
acl: acl-notify-{{ master }}
|
||||
{% endfor %}
|
||||
{% for master in zone.masters %}
|
||||
master: remote-{{ master }}
|
||||
|
|
Loading…
Reference in a new issue