Restructure the config files a bit.
authorStephen Gran <steve@lobefin.net>
Wed, 1 Jul 2009 19:22:18 +0000 (20:22 +0100)
committerStephen Gran <steve@lobefin.net>
Wed, 1 Jul 2009 19:22:18 +0000 (20:22 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/geodns/files/common/named.conf.geo [new file with mode: 0644]
modules/geodns/files/common/named.conf.local
modules/geodns/manifests/init.pp

diff --git a/modules/geodns/files/common/named.conf.geo b/modules/geodns/files/common/named.conf.geo
new file mode 100644 (file)
index 0000000..733e06b
--- /dev/null
@@ -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;
+        };
+};
+
index ba4ae0b..5397f6d 100644 (file)
@@ -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";
index 27d2365..79222c9 100644 (file)
@@ -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" ],