Add monit module and deploy to aargento as a test for now
[mirror/dsa-puppet.git] / modules / monit / manifest / init.pp
diff --git a/modules/monit/manifest/init.pp b/modules/monit/manifest/init.pp
new file mode 100644 (file)
index 0000000..894be00
--- /dev/null
@@ -0,0 +1,54 @@
+class clamav {
+    package { "monit": ensure => installed;
+    }
+
+    file {
+        "/etc/monit/monitrc":
+          source  => "puppet:///monit/monitrc",
+          require => Package["monit"],
+          notify  => Exec["monit restart"]
+          mode    => 440,
+          ;
+    }
+
+    file {
+        "/etc/monit/monit.d":
+          ensure  => directory,
+          owner   => root,
+          group   => root,
+          mode    => 750,
+          purge   => true
+          ;
+    }
+
+    file {
+        "/etc/monit/monit.d/01puppet":
+          source  => "puppet:///monit/puppet",
+          require => Package["monit"],
+          notify  => Exec["monit restart"]
+          mode    => 440,
+          ;
+    }
+
+    file {
+        "/etc/monit/monit.d/00debian.org":
+          source  => "puppet:///monit/debianorg",
+          require => Package["monit"],
+          notify  => Exec["monit restart"]
+          mode    => 440,
+          ;
+    }
+
+    file {
+        "/etc/default/monit":
+          source  => "puppet:///monit/default",
+          require => Package["monit"],
+          notify  => Exec["monit restart"]
+          ;
+    }
+    exec { "monit restart":
+        path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+        refreshonly => true,
+    }
+}
+