Merge commit 'puzzle/development'
[puppet_denyhosts.git] / manifests / init.pp
1 #######################################
2 # denyhosts module
3 # Puzzle ITC - haerry+puppet(at)puzzle.ch
4 # GPLv3
5 # this module is used to configure the
6 # denyhosts script.
7 #######################################
8
9
10 # modules_dir { "denyhosts": }
11 class denyhosts {
12     include denyhosts::base
13 }
14
15 class denyhosts::base  {
16     package{denyhosts:
17         ensure => present,
18     }
19
20     service{denyhosts:
21         enable => true,
22         ensure => running,
23         require => [ Package[denyhosts], 
24             File["/etc/denyhosts.conf"], 
25             File["/var/lib/denyhosts/allowed-hosts"] ],
26     }
27
28     file{"/etc/denyhosts.conf":
29         source => [ "puppet://$server/files/denyhosts/${fqdn}/denyhosts.conf", 
30                     "puppet://$server/files/denyhosts/denyhosts.conf",
31                     "puppet://$server/denyhosts/denyhosts.conf" ],
32         notify => Service[denyhosts],
33         mode => 0600, owner => root, group => 0;
34     }
35     file{"/var/lib/denyhosts/allowed-hosts":
36         source => [ "puppet://$server/files/denyhosts/${fqdn}/allowed-hosts", 
37                     "puppet://$server/files/denyhosts/allowed-hosts",
38                     "puppet://$server/denyhosts/allowed-hosts" ],
39         notify => Service[denyhosts],
40         mode => 0600, owner => root, group => 0;
41     }
42 }