feat: add option allow_tranfer for zones
This commit is contained in:
parent
77f4d97787
commit
54ee906547
3 changed files with 17 additions and 1 deletions
|
@ -24,6 +24,14 @@ end
|
|||
end
|
||||
end
|
||||
|
||||
describe file('/etc/bind/named.conf.local') do
|
||||
it { should be_file }
|
||||
it { should be_mode 644 }
|
||||
it { should be_owned_by 'root' }
|
||||
it { should be_grouped_into 'root' }
|
||||
it { should contain '4.2.2.4' }
|
||||
end
|
||||
|
||||
describe command('host hello.test.local 127.0.0.1') do
|
||||
its(:exit_status) { should eq 0 }
|
||||
its(:stdout) { should contain('1.2.3.4') }
|
||||
|
|
|
@ -8,6 +8,12 @@ zone "{{ zone }}" IN {
|
|||
{% else %}
|
||||
file "/etc/bind/zones/db.{{ zone }}";
|
||||
{% endif %}
|
||||
allow-transfer { 217.70.177.40; };
|
||||
{% if 'allow_transfer' in value and value.dnssec %}
|
||||
allow-transfer {
|
||||
{% for ip in value.allow_transfer %}
|
||||
{{ ip }};
|
||||
{% endfor %}
|
||||
};
|
||||
{% endif %}
|
||||
};
|
||||
{% endfor %}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
bind_role: master
|
||||
bind_zones:
|
||||
test.local:
|
||||
allow_transfer:
|
||||
- '4.2.2.4'
|
||||
ns_primary: ns1.test.local
|
||||
mail: root@test.local
|
||||
serial: 2017092202
|
||||
|
|
Loading…
Reference in a new issue