]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/nagios/manifests/init.pp
single quotes
[dsa-puppet.git] / modules / nagios / manifests / init.pp
index 577c56fcb04a5fbdeac34d9bc0c18f8f34da05ce..70e08658a8b0495957c0e84a4772eef156f8bbc0 100644 (file)
@@ -1,40 +1,10 @@
-class nagiosclient {
+class nagios {
        package {
                nagios-nrpe-server: ensure => installed;
-               dsa-nagios-checks: ensure => installed;
        }
-
-       file {
-               "/etc/default/nagios-nrpe-server":
-                       source  => [ "puppet:///nagios/per-host/$fqdn/default",
-                                    "puppet:///nagios/common/default" ],
-                       require => Package["nagios-nrpe-server"],
-                       notify  => Exec["nagios-nrpe-server restart"];
-               "/etc/default/nagios-nrpe":
-                       ensure  => absent,
-                       notify  => Exec["nagios-nrpe-server restart"];
-               "/etc/nagios/nrpe.cfg":
-                       source  => [ "puppet:///nagios/per-host/$fqdn/nrpe.cfg",
-                                    "puppet:///nagios/common/nrpe.cfg" ],
-                       require => Package["nagios-nrpe-server"],
-                       notify  => Exec["nagios-nrpe-server restart"];
-               "/etc/nagios/nrpe.cfg":
-                       source  => [ "puppet:///nagios/per-host/$fqdn/nrpe.cfg",
-                                    "puppet:///nagios/common/nrpe.cfg" ],
-                       require => Package["nagios-nrpe-server"],
-                       notify  => Exec["nagios-nrpe-server restart"];
-               "/etc/nagios/nrpe.d":
-                       mode    => 755,
-                       ensure  => directory;
-               "/etc/nagios/nrpe.d/nrpe_dsa.cfg":
-                       source  => [ "puppet:///nagios/dsa-nagios/generated/nrpe_dsa.cfg" ],
-                       require => Package["nagios-nrpe-server"],
-                       notify  => Exec["nagios-nrpe-server restart"];
-       }
-
-       exec { "nagios-nrpe-server restart":
-               path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
-               refreshonly => true,
+       ferm::rule { "dsa-nagios":
+               description     => "Allow nrpe from spohr.debian.org",
+               rule            => 'proto tcp dport 5666 saddr $HOST_NAGIOS ACCEPT',
+               prio            => "03"
        }
 }
-