Merge branch 'master' of ssh://handel.debian.org/srv/puppet.debian.org/git/dsa-puppet
[mirror/dsa-puppet.git] / modules / monit / manifests / init.pp
index a3b9282..efa8689 100644 (file)
@@ -1,17 +1,22 @@
 class monit {
-    package { "monit": ensure => installed;
-    }
+    package { "monit": ensure => installed }
 
     file {
+        "/etc/monit/":
+          ensure  => directory,
+          owner   => root,
+          group   => root,
+          mode    => 755,
+          purge   => true
+          ;
+
         "/etc/monit/monitrc":
-          source  => "puppet:///monit/monitrc",
+          content => template("monit/monitrc.erb"),
           require => Package["monit"],
-          notify  => Exec["monit restart"]
-          mode    => 440,
+          notify  => Exec["monit stop"],
+          mode    => 400
           ;
-    }
 
-    file {
         "/etc/monit/monit.d":
           ensure  => directory,
           owner   => root,
@@ -19,36 +24,33 @@ class monit {
           mode    => 750,
           purge   => true
           ;
-    }
 
-    file {
         "/etc/monit/monit.d/01puppet":
           source  => "puppet:///monit/puppet",
           require => Package["monit"],
-          notify  => Exec["monit restart"]
-          mode    => 440,
+          notify  => Exec["monit stop"],
+          mode    => 440
           ;
-    }
 
-    file {
         "/etc/monit/monit.d/00debian.org":
           source  => "puppet:///monit/debianorg",
           require => Package["monit"],
-          notify  => Exec["monit restart"]
-          mode    => 440,
+          notify  => Exec["monit stop"],
+          mode    => 440
           ;
-    }
 
-    file {
         "/etc/default/monit":
-          source  => "puppet:///monit/default",
+          content => template("monit/default.erb"),
           require => Package["monit"],
-          notify  => Exec["monit restart"]
+          notify  => Exec["monit stop"]
           ;
     }
-    exec { "monit restart":
+    exec { "monit stop":
         path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
         refreshonly => true,
     }
 }
 
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4: