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 %}
file "/etc/bind/zones/{{ zone }}/db";
{% endif %}
{% if 'allow_transfer' in value and value.dnssec %}
allow-transfer {
{% if 'allow_transfer' in value and value.dnssec %}
{% for ip in value.allow_transfer %}
{{ ip }};
{% endfor %}
};
{% else %}
"none";
{% endif %}
};
{% 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 %};