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 %} {%- endmacro %}
# root domain # root domain
{%- for ctx, domain in pillar['bind']['root-domain'].items() %} {%- for ctx, root_domain in pillar['bind']['root-domain'].items() %}
zone "{{ domain }}" IN { zone "{{ root_domain }}" IN {
type master; type master;
file "/etc/bind/{{ domain }}.zone"; file "/etc/bind/{{ root_domain }}.zone";
{{ slaves() }} {{ slaves() }}
}; };
{%- endfor %}
# net zones # net zones
{%- for net, subnet4 in pillar['subnets-inet'].items() %} {%- for net, subnet4 in pillar['subnets-inet'].items() %}
{%- set domain = net ~ '.' ~ pillar['bind']['root-domain'] %} {%- set domain = net ~ '.' ~ root_domain %}
zone "{{ domain }}" IN { zone "{{ domain }}" IN {
type master; type master;
file "/etc/bind/{{ domain }}.zone"; file "/etc/bind/{{ domain }}.zone";
{{ slaves() }} {{ slaves() }}
}; };
{%- endfor %}
{%- endfor %} {%- endfor %}
# IPv4 reverse zones # IPv4 reverse zones

View File

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