Break eximmx class up into clamav and postgrey classes. We can still
authorStephen Gran <steve@lobefin.net>
Fri, 20 Mar 2009 21:50:37 +0000 (21:50 +0000)
committerStephen Gran <steve@lobefin.net>
Fri, 20 Mar 2009 21:50:37 +0000 (21:50 +0000)
use the eximmx class as is, but we can also include the other classes
directly on machines where for some reason we want more granular
installs.
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/clamav/manifests/init.pp [new file with mode: 0644]
modules/exim/manifests/init.pp
modules/postgrey/manifests/init.pp [new file with mode: 0644]

diff --git a/modules/clamav/manifests/init.pp b/modules/clamav/manifests/init.pp
new file mode 100644 (file)
index 0000000..d8c35a3
--- /dev/null
@@ -0,0 +1,30 @@
+class clamav {
+    package { "clamav-daemon": ensure => latest;
+              "clamav-freshclam": ensure => latest;
+    }
+
+    file {
+        "/etc/clamav/clamd.conf":
+          source  => "puppet:///clamav/clamd.conf",
+          require => Package["clamav-daemon"],
+          notify  => Exec["clamav-daemon restart"]
+          ;
+    }
+
+    file {
+        "/etc/clamav/freshclam.conf":
+          source  => "puppet:///clamav/freshclam.conf",
+          require => Package["clamav-freshclam"],
+          notify  => Exec["clamav-freshclam restart"]
+          ;
+    }
+    exec { "clamav-daemon restart":
+        path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+        refreshonly => true,
+    }
+    exec { "clamav-freshclam restart":
+        path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+        refreshonly => true,
+    }
+}
+
index 76a2199..0aa2e00 100644 (file)
@@ -94,29 +94,6 @@ class exim {
 }
 
 class eximmx inherits exim {
-    package { "clamav-daemon": ensure => latest;
-              "postgrey": ensure => installed;
-    }
-
-    file {
-        "/etc/default/postgrey":
-          source  => "puppet:///exim/common/postgrey-default",
-          require => Package["postgrey"],
-          notify  => Exec["postgrey restart"]
-          ;
-        "/etc/clamav/clamd.conf":
-          source  => "puppet:///exim/common/clamd.conf",
-          require => Package["clamav-daemon"],
-          notify  => Exec["clamav-daemon restart"]
-          ;
-    }
-
-    exec { "clamav-daemon restart":
-        path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
-        refreshonly => true,
-    }
-    exec { "postgrey restart":
-        path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
-        refreshonly => true,
-    }
+    include clamav;
+    include postgrey;
 }
diff --git a/modules/postgrey/manifests/init.pp b/modules/postgrey/manifests/init.pp
new file mode 100644 (file)
index 0000000..fd735b9
--- /dev/null
@@ -0,0 +1,16 @@
+class postgrey {
+    package { "postgrey": ensure => installed; }
+
+    file {
+        "/etc/default/postgrey":
+          source  => "puppet:///exim/common/postgrey-default",
+          require => Package["postgrey"],
+          notify  => Exec["postgrey restart"]
+          ;
+    }
+
+    exec { "postgrey restart":
+        path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+        refreshonly => true,
+    }
+}