refactor everything into it's own file, fix a regression of 0.25
authormh <mh@immerda.ch>
Sat, 31 Oct 2009 14:24:26 +0000 (15:24 +0100)
committermh <mh@immerda.ch>
Sat, 31 Oct 2009 14:24:26 +0000 (15:24 +0100)
manifests/base.pp [new file with mode: 0644]
manifests/gentoo.pp [new file with mode: 0644]
manifests/init.pp

diff --git a/manifests/base.pp b/manifests/base.pp
new file mode 100644 (file)
index 0000000..4392fa4
--- /dev/null
@@ -0,0 +1,33 @@
+class denyhosts::base  {
+    package{denyhosts:
+        ensure => present,
+    }
+
+    service{denyhosts:
+        enable => true,
+        ensure => running,
+        require => [ Package[denyhosts], 
+            File["/etc/denyhosts.conf"], 
+            File["/var/lib/denyhosts/allowed-hosts"] ],
+    }
+
+    file{'/etc/denyhosts.conf':
+        source => [ "puppet://$server/files/denyhosts/${fqdn}/denyhosts.conf", 
+                    "puppet://$server/files/denyhosts/denyhosts.conf",
+                    "puppet://$server/denyhosts/denyhosts.conf" ],
+        notify => Service[denyhosts],
+        mode => 0600, owner => root, group => 0;
+    }
+
+    file{'/var/lib/denyhosts':
+        ensure => directory,
+        owner => root, group => 0, mode => 0700; 
+    }
+    file{'/var/lib/denyhosts/allowed-hosts':
+        source => [ "puppet://$server/files/denyhosts/${fqdn}/allowed-hosts", 
+                    "puppet://$server/files/denyhosts/allowed-hosts",
+                    "puppet://$server/denyhosts/allowed-hosts" ],
+        notify => Service[denyhosts],
+        mode => 0600, owner => root, group => 0;
+    }
+}
diff --git a/manifests/gentoo.pp b/manifests/gentoo.pp
new file mode 100644 (file)
index 0000000..46f5ced
--- /dev/null
@@ -0,0 +1,5 @@
+class denyhosts::gentoo inherits denyhosts::base {
+    Package[denyhosts]{
+        category => 'app-admin',
+    }
+}
index 16f2c7a..0bf1124 100644 (file)
 # denyhosts script.
 #
 
-# modules_dir { "denyhosts": }
-
 class denyhosts {
     case $operatingsystem {
         gentoo: { include denyhosts::gentoo }
         default: { include denyhosts::base }
     }
 }
-
-class denyhosts::base  {
-    package{denyhosts:
-        ensure => present,
-    }
-
-    service{denyhosts:
-        enable => true,
-        ensure => running,
-        require => [ Package[denyhosts], 
-            File["/etc/denyhosts.conf"], 
-            File["/var/lib/denyhosts/allowed-hosts"] ],
-    }
-
-    file{'/etc/denyhosts.conf':
-        source => [ "puppet://$server/files/denyhosts/${fqdn}/denyhosts.conf", 
-                    "puppet://$server/files/denyhosts/denyhosts.conf",
-                    "puppet://$server/denyhosts/denyhosts.conf" ],
-        notify => Service[denyhosts],
-        mode => 0600, owner => root, group => 0;
-    }
-
-    file{'/var/lib/denyhosts/':
-        ensure => directory,
-        owner => root, group => 0, mode => 0700; 
-    }
-    file{'/var/lib/denyhosts/allowed-hosts':
-        source => [ "puppet://$server/files/denyhosts/${fqdn}/allowed-hosts", 
-                    "puppet://$server/files/denyhosts/allowed-hosts",
-                    "puppet://$server/denyhosts/allowed-hosts" ],
-        notify => Service[denyhosts],
-        require => File['/var/lib/denyhosts/'],
-        mode => 0600, owner => root, group => 0;
-    }
-}
-
-class denyhosts::gentoo inherits denyhosts::base {
-    Package[denyhosts]{
-        category => 'app-admin',
-    }
-}