Merge remote-tracking branch 'cwarden/debian-squeeze-htmldir-fix' into master
[puppet_munin.git] / manifests / host.pp
1 # host.pp - the master host of the munin installation
2 # Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
3 # See LICENSE for the full license granted to you.
4
5 class munin::host {
6   package {"munin": ensure => installed, }
7
8   Concat::Fragment <<| tag == 'munin' |>>
9
10   concat::fragment{'munin.conf.header':
11     target => '/etc/munin/munin.conf',
12     source => [ "puppet:///modules/site-munin/config/host/${::fqdn}/munin.conf.header",
13                 "puppet:///modules/site-munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}",
14                 "puppet:///modules/site-munin/config/host/munin.conf.header.${::operatingsystem}",
15                 "puppet:///modules/site-munin/config/host/munin.conf.header",
16                 "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}",
17                 "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}",
18                 "puppet:///modules/munin/config/host/munin.conf.header" ],
19     order => 05,
20   }
21
22   concat{ "/etc/munin/munin.conf":
23     owner => root, group => 0, mode => 0644;
24   }
25
26   include munin::plugins::muninhost
27
28   if $munin_do_cgi_graphing {
29     include munin::host::cgi
30   }
31
32   # from time to time we cleanup hanging munin-runs
33   file{'/etc/cron.d/munin_kill':
34     content => "4,34 * * * * root if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi\n",
35     owner => root, group => 0, mode => 0644;
36   }
37   if $use_shorewall {
38     include shorewall::rules::out::munin
39   }
40 }