feat: add zones options

This commit is contained in:
Adrien Waksberg 2018-03-17 20:39:53 +01:00
parent 3532526a07
commit 19d80e9aef
4 changed files with 14 additions and 0 deletions

View file

@ -48,6 +48,10 @@ bind_zones:
mail: root@hello.local
serial: 2017092201
dnssec: no
options:
key-directory: '"/etc/bind/keys"'
auto-dnssec: maintain
inline-signing: yes
records:
- { name: '@', type: ns, value: localhost. }
- { name: hello, type: a, value: 4.3.2.1 }

View file

@ -15,5 +15,10 @@ zone "{{ zone }}" IN {
{% endfor %}
};
{% 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 %};
{% endfor %}
{% endif %}
};
{% endfor %}

View file

@ -16,6 +16,10 @@
expire: 2419200
negative_cache: 86400
dnssec: yes
options:
auto-dnssec: maintain
inline-signing: yes
key-directory: '"/etc/bind/keys"'
records:
- { name: '@', type: mx, priority: 20, value: mail.test.local. }
- { name: '@', type: ns, value: localhost. }

View file

@ -35,6 +35,7 @@ describe file('/etc/bind/named.conf.local') do
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should contain '4.2.2.4' }
it { should contain 'inline-signing yes;' }
end
describe file('/etc/bind/named.conf.options') do