2016-03-26 17:54:31 +01:00
|
|
|
# Secondary zone definition for {{ item.zone_name }}
|
2016-03-26 18:20:38 +01:00
|
|
|
|
|
|
|
{% for master in item.masters %}
|
|
|
|
{% if master.tsig_secret is defined %}
|
|
|
|
key:
|
|
|
|
name: "{{ item.zone_name }}_{{ master.ip }}"
|
|
|
|
algorithm: "{{ master.tsig_algorithm }}"
|
|
|
|
secret: "{{ master.tsig_secret }}"
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{%- macro tsigkey(master) %}
|
|
|
|
{% if master.tsig_secret is defined %}{{ item.zone_name }}_{{ master.ip }}{% else %}NOKEY{% endif %}
|
|
|
|
{% endmacro -%}
|
|
|
|
|
2016-03-26 17:54:31 +01:00
|
|
|
zone:
|
|
|
|
name: "{{ item.zone_name }}"
|
|
|
|
zonefile: "{{ secondary_zones_dir }}/{{ item.zone_name }}"
|
|
|
|
{% for master in item.masters %}
|
2016-03-26 18:20:38 +01:00
|
|
|
allow-notify: {{ master.ip }} "{{ tsigkey(master) }}"
|
|
|
|
request-xfr: AXFR {{ master.ip }} "{{ tsigkey(master) }}"
|
2016-03-26 17:54:31 +01:00
|
|
|
{% endfor %}
|
|
|
|
|