summaryrefslogtreecommitdiff
path: root/manifests/host.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/host.pp')
-rw-r--r--manifests/host.pp32
1 files changed, 19 insertions, 13 deletions
diff --git a/manifests/host.pp b/manifests/host.pp
index 05dcb5e..0e5fb01 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -4,40 +4,46 @@
class munin::host(
$cgi_graphing = false,
+ $cgi_owner = 'os_default',
$export_tag = 'munin'
) {
- package {"munin": ensure => installed, }
- include concat::setup
+ package {'munin': ensure => installed, }
Concat::Fragment <<| tag == $export_tag |>>
concat::fragment{'munin.conf.header':
target => '/etc/munin/munin.conf',
source => [ "puppet:///modules/site_munin/config/host/${::fqdn}/munin.conf.header",
- "puppet:///modules/site_munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}",
+ "puppet:///modules/site_munin/config/host/munin.conf.header.${::operatingsystem}.${::operatingsystemmajrelease}",
"puppet:///modules/site_munin/config/host/munin.conf.header.${::operatingsystem}",
- "puppet:///modules/site_munin/config/host/munin.conf.header",
- "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}",
+ 'puppet:///modules/site_munin/config/host/munin.conf.header',
+ "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}.${::operatingsystemmajrelease}",
"puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}",
- "puppet:///modules/munin/config/host/munin.conf.header" ],
- order => 05,
+ 'puppet:///modules/munin/config/host/munin.conf.header' ],
+ order => 05,
}
- concat{ "/etc/munin/munin.conf":
- owner => root, group => 0, mode => 0644;
+ concat{ '/etc/munin/munin.conf':
+ owner => root,
+ group => 0,
+ mode => '0644',
}
include munin::plugins::muninhost
if $munin::host::cgi_graphing {
- include munin::host::cgi
+ class {'munin::host::cgi':
+ owner => $cgi_owner,
+ }
}
# from time to time we cleanup hanging munin-runs
- file{'/etc/cron.d/munin_kill':
- content => "4,34 * * * * root if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi\n",
- owner => root, group => 0, mode => 0644;
+ cron { 'munin_kill':
+ command => 'if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi',
+ minute => ['4', '34'],
+ user => 'root',
}
+
if $munin::host::manage_shorewall {
include shorewall::rules::out::munin
}