fix: full disable allow_transfer if empty
This commit is contained in:
parent
66a2e31c92
commit
3078ba57f8
1 changed files with 4 additions and 2 deletions
|
@ -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 %};
|
||||||
|
|
Loading…
Reference in a new issue