fix: full disable allow_transfer if empty

This commit is contained in:
Adrien Waksberg 2018-07-08 23:02:11 +02:00
parent 66a2e31c92
commit 3078ba57f8

View file

@ -9,13 +9,15 @@ zone "{{ zone }}" IN {
{% else %} {% else %}
file "/etc/bind/zones/{{ zone }}/db"; file "/etc/bind/zones/{{ zone }}/db";
{% endif %} {% endif %}
{% if 'allow_transfer' in value and value.dnssec %}
allow-transfer { allow-transfer {
{% if 'allow_transfer' in value and value.dnssec %}
{% for ip in value.allow_transfer %} {% for ip in value.allow_transfer %}
{{ ip }}; {{ ip }};
{% endfor %} {% endfor %}
}; {% else %}
"none";
{% endif %} {% endif %}
};
{% if 'options' in value %} {% if 'options' in value %}
{% for option, opt_value in value.options.iteritems() %} {% for option, opt_value in value.options.iteritems() %}
{{ option }} {% if opt_value == True %}yes{% elif opt_value == False %}no{% else %}{{ opt_value }}{% endif %}; {{ option }} {% if opt_value == True %}yes{% elif opt_value == False %}no{% else %}{{ opt_value }}{% endif %};