summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp42
1 files changed, 42 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 0000000..675aff8
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,42 @@
+#######################################
+# denyhosts module
+# Puzzle ITC - haerry+puppet(at)puzzle.ch
+# GPLv3
+# this module is used to configure the
+# denyhosts script.
+#######################################
+
+
+# modules_dir { "denyhosts": }
+class denyhosts {
+ 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/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;
+ }
+}