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 %}
|
||||
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 %};
|
||||
|
|
Loading…
Reference in a new issue