nsd/templates/secondary_zone_config.j2
2016-03-26 18:51:42 +01:00

24 lines
722 B
Django/Jinja

# Secondary zone definition for {{ item.zone_name }}
{% for master in item.masters|default([]) %}
{% 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([]) %}
allow-notify: {{ master.ip }} "{{ tsigkey(master) }}"
request-xfr: AXFR {{ master.ip }} "{{ tsigkey(master) }}"
{% endfor %}