nsd/templates/secondary_zone_config.j2

24 lines
722 B
Plaintext
Raw Normal View History

# Secondary zone definition for {{ item.zone_name }}
2016-03-26 18:20:38 +01:00
{% for master in item.masters|default([]) %}
2016-03-26 18:20:38 +01:00
{% 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 -%}
zone:
name: "{{ item.zone_name }}"
zonefile: "{{ secondary_zones_dir }}/{{ item.zone_name }}"
{% for master in item.masters|default([]) %}
2016-03-26 18:20:38 +01:00
allow-notify: {{ master.ip }} "{{ tsigkey(master) }}"
request-xfr: AXFR {{ master.ip }} "{{ tsigkey(master) }}"
{% endfor %}