]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
try to rolify dns
authorPeter Palfrader <peter@palfrader.org>
Wed, 1 Jan 2014 20:41:15 +0000 (21:41 +0100)
committerPeter Palfrader <peter@palfrader.org>
Wed, 1 Jan 2014 20:41:15 +0000 (21:41 +0100)
manifests/site.pp
modules/debian-org/misc/local.yaml
modules/named/manifests/init.pp
modules/named/manifests/primary.pp [new file with mode: 0644]
modules/roles/manifests/init.pp

index 2232624564d4021b0ba072aa52036d5d435f1ee8..eecf27cd6768e3529a98a41521b0d25b196c6dd4 100644 (file)
@@ -86,14 +86,9 @@ node default {
                include apache2
        }
 
-       if $::hostname in [ravel,senfl,orff,diamond,rietz,denis] {
-               include named::authoritative
-       } elsif $::hostname in [geo1,geo2,geo3] {
+       if $::hostname in [geo1,geo2,geo3] {
                include named::geodns
        }
-       if $::hostname in [denis] {
-               include dnsextras::entries
-       }
 
        if $::hostname in [diabelli,nono] {
                include dacs
index c975cce40d157628a21495ef0143aaebf4ef3d48..9210978bee772e004ce739b3b52e3625834ef324 100644 (file)
@@ -368,3 +368,10 @@ host_settings:
   buildd_master:
     - grieg.debian.org
     - wuiet.debian.org
+  dns_primary:
+    - denis.debian.org
+  dns_secondary:
+    - ravel.debian.org
+    - senfl.debian.org
+    - diamond.debian.org
+    - orff.debian.org
index 9f1c7f908faee7a6a6a200863eaae1d693f390ea..da2313c138f12bf12f90ab0732a1df949420c7ad 100644 (file)
@@ -1,5 +1,4 @@
 class named {
-
        munin::check { 'bind': }
 
        site::aptrepo { 'bind-ratelimit':
@@ -22,10 +21,23 @@ class named {
                rule        => 'proto udp dport 53 mod string from 32 to 64 algo bm hex-string \'|0000ff0001|\' jump DROP'
        }
 
-       @ferm::rule { '01-dsa-bind':
-               domain      => '(ip ip6)',
-               description => 'Allow nameserver access',
-               rule        => '&TCP_UDP_SERVICE(53)'
+       if getfromhash($site::nodeinfo, 'dns_primary') {
+               @ferm::rule { '01-dsa-bind-4':
+                       domain      => '(ip)',
+                       description => 'Allow nameserver access',
+                       rule        => '&SERVICE_RANGE(tcp, 5671, $HOST_DEBIAN_V4)',
+               }
+               @ferm::rule { '01-dsa-bind-6':
+                       domain      => '(ip6)',
+                       description => 'Allow nameserver access',
+                       rule        => '&SERVICE_RANGE(tcp, 5671, $HOST_DEBIAN_V6)',
+               }
+       } else {
+               @ferm::rule { '01-dsa-bind':
+                       domain      => '(ip ip6)',
+                       description => 'Allow nameserver access',
+                       rule        => '&TCP_UDP_SERVICE(53)'
+               }
        }
 
        @ferm::rule { 'dsa-bind-notrack':
diff --git a/modules/named/manifests/primary.pp b/modules/named/manifests/primary.pp
new file mode 100644 (file)
index 0000000..e16ddb6
--- /dev/null
@@ -0,0 +1,3 @@
+class named::primary inherits named::authoritative {
+       include dnsextras::entries;
+}
index 6b17ea0f65d0cfb591dd78cb6a47d18b98c713c3..21559a8bc11d37bb1560c7c03c617be5f1877820 100644 (file)
@@ -99,6 +99,13 @@ class roles {
                }
        }
 
+       if getfromhash($site::nodeinfo, 'dns_primary') {
+               include named::primary
+       }
+       if getfromhash($site::nodeinfo, 'dns_secondary') {
+               include named::authoritative
+       }
+
        if $::hostname in [ravel] {
                include roles::weblog_destination
        }