feat: add zones options
This commit is contained in:
parent
3532526a07
commit
19d80e9aef
4 changed files with 14 additions and 0 deletions
|
@ -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 }
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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. }
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue