From: Stephen Gran Date: Wed, 1 Jul 2009 19:22:18 +0000 (+0100) Subject: Restructure the config files a bit. X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=df2e7cda3888fc73e0b53c2245b4a033d82caa45;hp=26507ca540387be9b03eea71664422062ce62769;p=mirror%2Fdsa-puppet.git Restructure the config files a bit. Signed-off-by: Stephen Gran --- diff --git a/modules/geodns/files/common/named.conf.geo b/modules/geodns/files/common/named.conf.geo new file mode 100644 index 000000000..733e06b8c --- /dev/null +++ b/modules/geodns/files/common/named.conf.geo @@ -0,0 +1,208 @@ +view "AF" { + match-clients { + AF; + }; + zone "www.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.AF"; + notify no; + }; + zone "www.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.AF"; + notify no; + }; + zone "security.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.AF"; + notify no; + }; + zone "security.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.AF"; + notify no; + }; +}; + +view "AN" { + match-clients { + AN; + }; + zone "www.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.AN"; + notify no; + }; + zone "www.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.AN"; + notify no; + }; + zone "security.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.AN"; + notify no; + }; + zone "security.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.AN"; + notify no; + }; +}; + +view "AS" { + match-clients { + AS; + }; + zone "www.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.AS"; + notify no; + }; + zone "www.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.AS"; + notify no; + }; + zone "security.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.AS"; + notify no; + }; + zone "security.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.AS"; + notify no; + }; +}; + +view "EU" { + match-clients { + EU; + }; + zone "www.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.EU"; + notify no; + }; + zone "www.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.EU"; + notify no; + }; + zone "security.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.EU"; + notify no; + }; + zone "security.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.EU"; + notify no; + }; +}; + +view "NA" { + match-clients { + NA; + }; + zone "www.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.NA"; + notify no; + }; + zone "www.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.NA"; + notify no; + }; + zone "security.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.NA"; + notify no; + }; + zone "security.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.NA"; + notify no; + }; +}; + +view "OC" { + match-clients { + OC; + }; + zone "www.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.OC"; + notify no; + }; + zone "www.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.OC"; + notify no; + }; + zone "security.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.OC"; + notify no; + }; + zone "security.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.OC"; + notify no; + }; +}; + +view "SA" { + match-clients { + SA; + }; + zone "www.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.SA"; + notify no; + }; + zone "www.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org.SA"; + notify no; + }; + zone "security.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.SA"; + notify no; + }; + zone "security.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org.SA"; + notify no; + }; +}; + +view "default" { + match-clients { + any; + }; + zone "www.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org"; + notify no; + }; + zone "www.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.www.debian.org"; + notify no; + }; + zone "security.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org"; + notify no; + }; + zone "security.geo.debian.org" { + type master; + file "/etc/bind/geodns/db.security.debian.org"; + notify no; + }; +}; + diff --git a/modules/geodns/files/common/named.conf.local b/modules/geodns/files/common/named.conf.local index ba4ae0ba6..5397f6d3d 100644 --- a/modules/geodns/files/common/named.conf.local +++ b/modules/geodns/files/common/named.conf.local @@ -4,4 +4,4 @@ // include "/etc/bind/named.conf.acl"; -include "/etc/bind/geodns/named.conf.geo.security.debian.org"; +include "/etc/bind/geodns/named.conf.geo"; diff --git a/modules/geodns/manifests/init.pp b/modules/geodns/manifests/init.pp index 27d236593..79222c9ec 100644 --- a/modules/geodns/manifests/init.pp +++ b/modules/geodns/manifests/init.pp @@ -40,6 +40,14 @@ class geodns { group => geodnssync, mode => 775, ; + "/etc/bind/geodns/named.conf.geo": + source => [ "puppet:///geodns/per-host/$fqdn/named.conf.geo", + "puppet:///geodns/common/named.conf.geo" ], + require => Package["bind9"], + notify => Exec["bind9 restart"], + owner => root, + group => root, + ; "/etc/bind/geodns/recvconf": source => [ "puppet:///geodns/per-host/$fqdn/recvconf", "puppet:///geodns/common/recvconf" ],