Register manualroutes from the service class for the three services that had it hardc...
[mirror/dsa-puppet.git] / modules / roles / manifests / dns_primary.pp
index 0c86ec1..8dd0f00 100644 (file)
@@ -43,7 +43,7 @@ class roles::dns_primary(
   }
 
   # firewalling
-  ferm::rule::simple { 'dsa-bind-from-third-party-secondaries':
+  ferm::rule::simple { 'dns-from-secondaries':
     description => 'Allow additional (such as 3rd party secondary nameserver) access to the primary',
     proto       => ['udp', 'tcp'],
     port        => 'domain',
@@ -51,4 +51,16 @@ class roles::dns_primary(
   }
   Ferm::Rule::Simple <<| tag == 'named::primary::ferm' |>>
 
+  # mini-nag does nrpe queries to check if hosts are still up
+  @@ferm::rule::simple { "dsa-nrpe-from-dnsprimary-${::fqdn}":
+    tag         => 'nagios-nrpe::server',
+    description => 'Allow dns primary running mini-nag access to the nrpe daemon',
+    port        => '5666',
+    saddr       => $base::public_addresses,
+  }
+  @@concat::fragment { "nrpe-debian-allow-${::fqdn}":
+    tag     => 'nagios-nrpe::server::debianorg.cfg',
+    target  => '/etc/nagios/nrpe.d/debianorg.cfg',
+    content => "allowed_hosts=${ $base::public_addresses.join(', ') }",
+  }
 }