Files
configpolicy/roles/named/templates/named.zones.j2
Dustin C. Hatch 3473694eb0 roles/named: Improve support for other zone types
Only *master* zones need zone files pre-populated, as the other types of
zones are populated by data named receives from queries and transfers.
Other types of zones require other options, however, to be usable. This
commit introduces minimal support for specifying *slave*, *forward*, and
*stub* zones.
2018-02-21 22:33:52 -06:00

43 lines
837 B
Django/Jinja

// Zone configuration for ISC BIND
{% for zone in named_zones %}
zone "{{ zone.zone }}" {
type {{ zone.type }};
{% if zone.type == 'forward' %}
{% if zone.forward|d %}
forward {{ zone.forward }};
{% endif %}
{% else %}
file "dynamic/{{ zone.zone }}.zone";
{% endif %}
{% if zone.allow_update|d %}
allow-update {
{% for auth in zone.allow_update %}
{{ auth }};
{% endfor %}
};
{% endif %}
{% if zone.update_policy|d %}
update-policy {
{% for auth in zone.update_policy %}
{{ auth }};
{% endfor %}
};
{% endif %}
{% if zone.forwarders|d %}
forwarders {
{% for forwarder in zone.forwarders %}
{{ forwarder }};
{% endfor %}
};
{% endif %}
{% if zone.masters|d %}
masters {
{% for master in zone.masters %}
{{ master }};
{% endfor %}
};
{% endif %}
};
{% endfor %}