ansible-role-bind/templates/named.conf.local.j2

25 lines
659 B
Text
Raw Normal View History

2017-10-08 12:55:01 +00:00
# {{ ansible_managed }}
{% for zone, value in bind_zones.iteritems() %}
zone "{{ zone }}" IN {
2018-03-17 17:26:08 +00:00
type master;
2017-10-08 12:55:01 +00:00
{% if 'dnssec' in value and value.dnssec %}
2018-03-17 17:26:08 +00:00
file "/etc/bind/zones/db.{{ zone }}.signed";
2017-10-08 12:55:01 +00:00
{% else %}
2018-03-17 17:26:08 +00:00
file "/etc/bind/zones/db.{{ zone }}";
2017-10-08 12:55:01 +00:00
{% endif %}
{% if 'allow_transfer' in value and value.dnssec %}
2018-03-17 17:26:08 +00:00
allow-transfer {
{% for ip in value.allow_transfer %}
{{ ip }};
{% endfor %}
};
{% endif %}
2018-03-17 19:39:53 +00:00
{% if 'options' in value %}
{% for option, opt_value in value.options.iteritems() %}
{{ option }} {% if opt_value == True %}yes{% elif opt_value == False %}no{% else %}{{ opt_value }}{% endif %};
{% endfor %}
{% endif %}
2017-10-08 12:55:01 +00:00
};
{% endfor %}