bind: ctxify 'public-ns'

This commit is contained in:
Astro 2018-06-26 22:46:35 +02:00
parent 178d28a7b3
commit 59667adf30
5 changed files with 11 additions and 8 deletions

View File

@ -6,7 +6,10 @@ bind:
dn42: dns.serv.zentralwerk.dn42 dn42: dns.serv.zentralwerk.dn42
up1: dns.serv.zentralwerk.org up1: dns.serv.zentralwerk.org
public-ns: public-ns:
- ns.c3d2.de dn42:
- dns.serv.zentralwerk.dn42
up1:
- ns.c3d2.de
slaves: slaves:
# ns.c3d2.de # ns.c3d2.de
- 217.197.84.53 - 217.197.84.53

View File

@ -2,12 +2,12 @@ $ORIGIN {{ domain }}.
$TTL 10M $TTL 10M
@ IN SOA {{ pillar['bind']['master-ns']['up1'] }}. astro.spaceboyz.net. ( @ IN SOA {{ pillar['bind']['master-ns']['up1'] }}. astro.spaceboyz.net. (
2 ; serial 3 ; serial
1H ; refresh 1H ; refresh
1M ; retry 1M ; retry
2H ; expire 2H ; expire
5M ; minimum 5M ; minimum
) )
{%- for ns in pillar['bind']['public-ns'] %} {%- for ns in pillar['bind']['public-ns']['up1'] %}
IN NS {{ ns }}. IN NS {{ ns }}.
{%- endfor %} {%- endfor %}

View File

@ -8,7 +8,7 @@ $TTL 10M
2H ; expire 2H ; expire
5M ; minimum 5M ; minimum
) )
{%- for ns in pillar['bind']['public-ns'] %} {%- for ns in pillar['bind']['public-ns'][ctx] %}
IN NS {{ ns }}. IN NS {{ ns }}.
{%- endfor %} {%- endfor %}

View File

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

View File

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