bind: ctx fixes

This commit is contained in:
Astro 2018-06-23 02:14:10 +02:00
parent f709d39ffa
commit 8729a12fbf
2 changed files with 7 additions and 7 deletions

View File

@ -16,22 +16,22 @@
{%- endmacro %}
# root domain
{%- for ctx, domain in pillar['bind']['root-domain'].items() %}
zone "{{ domain }}" IN {
{%- for ctx, root_domain in pillar['bind']['root-domain'].items() %}
zone "{{ root_domain }}" IN {
type master;
file "/etc/bind/{{ domain }}.zone";
file "/etc/bind/{{ root_domain }}.zone";
{{ slaves() }}
};
{%- endfor %}
# net zones
{%- for net, subnet4 in pillar['subnets-inet'].items() %}
{%- set domain = net ~ '.' ~ pillar['bind']['root-domain'] %}
{%- for net, subnet4 in pillar['subnets-inet'].items() %}
{%- set domain = net ~ '.' ~ root_domain %}
zone "{{ domain }}" IN {
type master;
file "/etc/bind/{{ domain }}.zone";
{{ slaves() }}
};
{%- endfor %}
{%- endfor %}
# IPv4 reverse zones

View File

@ -8,7 +8,7 @@ $TTL 10M
2H ; expire
5M ; minimum
)
IN NS {{ pillar['bind']['master-ns'] }}.
IN NS {{ pillar['bind']['master-ns'][ctx] }}.
{%- if ctx == 'dn42' %}
{%- for net, hosts in pillar['hosts-inet'].items() %}