ansible/roles/bind-authoritative/templates/bind/named.conf.local.j2

39 lines
973 B
Django/Jinja

{{ ansible_header | comment(decoration='// ') }}
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
{% if bind.rfc2136_keys is defined %}
include "/etc/bind/named.conf.key";
{% endif %}
{% for zonename,zone in bind.zones.items() %}
zone "{{ zonename }}" {
{% set zone = bind.default | combine(zone) %}
type {{ zone.type | default('primary') }};
{% if zone.update_policy is defined %}
update-policy {
{% for policy in zone.update_policy %}
{{ policy }};
{% endfor %}
};
{% endif %}
file "{{ zone.format | default('') | format(zonename) }}";
{% if zone.primaries is defined and zone.primaries != False %}
masters {
{% for primary in zone.primaries %}
{{ primary }};
{% endfor %}
};
{% endif %}
notify {{ zone.notify | default('no') }};
{% if zone.dnssec is defined and zone.dnssec %}
inline-signing yes;
auto-dnssec maintain;
serial-update-method increment;
{% endif %}
};
{% endfor %}