From 59667adf30391c61579b914514efe807df16b7b9 Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 26 Jun 2018 22:46:35 +0200 Subject: [PATCH] bind: ctxify 'public-ns' --- salt-pillar/bind/dns.sls | 5 ++++- salt/bind/dyn-domain.zone | 4 ++-- salt/bind/net-domain.zone | 2 +- salt/bind/reverse.zone | 2 +- salt/bind/root-domain.zone | 6 +++--- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/salt-pillar/bind/dns.sls b/salt-pillar/bind/dns.sls index 3fcec9a..63d4c4f 100644 --- a/salt-pillar/bind/dns.sls +++ b/salt-pillar/bind/dns.sls @@ -6,7 +6,10 @@ bind: dn42: dns.serv.zentralwerk.dn42 up1: dns.serv.zentralwerk.org public-ns: - - ns.c3d2.de + dn42: + - dns.serv.zentralwerk.dn42 + up1: + - ns.c3d2.de slaves: # ns.c3d2.de - 217.197.84.53 diff --git a/salt/bind/dyn-domain.zone b/salt/bind/dyn-domain.zone index c67d7d3..368a6bb 100644 --- a/salt/bind/dyn-domain.zone +++ b/salt/bind/dyn-domain.zone @@ -2,12 +2,12 @@ $ORIGIN {{ domain }}. $TTL 10M @ IN SOA {{ pillar['bind']['master-ns']['up1'] }}. astro.spaceboyz.net. ( - 2 ; serial + 3 ; serial 1H ; refresh 1M ; retry 2H ; expire 5M ; minimum ) -{%- for ns in pillar['bind']['public-ns'] %} +{%- for ns in pillar['bind']['public-ns']['up1'] %} IN NS {{ ns }}. {%- endfor %} diff --git a/salt/bind/net-domain.zone b/salt/bind/net-domain.zone index ba84140..2692c84 100644 --- a/salt/bind/net-domain.zone +++ b/salt/bind/net-domain.zone @@ -8,7 +8,7 @@ $TTL 10M 2H ; expire 5M ; minimum ) -{%- for ns in pillar['bind']['public-ns'] %} +{%- for ns in pillar['bind']['public-ns'][ctx] %} IN NS {{ ns }}. {%- endfor %} diff --git a/salt/bind/reverse.zone b/salt/bind/reverse.zone index 788fc36..69fa2de 100644 --- a/salt/bind/reverse.zone +++ b/salt/bind/reverse.zone @@ -8,7 +8,7 @@ $TTL 10M 2H ; expire 5M ; minimum ) - IN NS {{ pillar['bind']['master-ns'][ctx] }}. + IN NS {{ pillar['bind']['public-ns'][ctx] }}. {%- if ctx == 'dn42' %} {%- for net, hosts in pillar['hosts-inet'].items() %} diff --git a/salt/bind/root-domain.zone b/salt/bind/root-domain.zone index 679877e..3eef95c 100644 --- a/salt/bind/root-domain.zone +++ b/salt/bind/root-domain.zone @@ -8,16 +8,16 @@ $TTL 10M 2H ; expire 5M ; minimum ) -{%- for ns in pillar['bind']['public-ns'] %} +{%- for ns in pillar['bind']['public-ns'][ctx] %} IN NS {{ ns }}. {%- endfor %} {%- 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 }}. {%- endfor %} {%- endfor %} -{%- for ns in pillar['bind']['public-ns'] %} +{%- for ns in pillar['bind']['public-ns'][ctx] %} dyn IN NS {{ ns }}. {%- endfor %}