diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-01-20 18:40:04 +0000 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-01-20 18:40:04 +0000 |
commit | 23201220bf8b7b63da44747be142face0c98eb09 (patch) | |
tree | c1645f62976281a552963b1309307e0d0b6136f3 /manifests/host.pp | |
parent | 7e03247a9e219fe8e57d544957eb06e305e69fc1 (diff) | |
parent | eaa092eb1a8f3ae19551e6e80f84d174211b5208 (diff) |
Merge branch 'merge_immerda' into 'master'
This is my attempt at merging the huge backlog of commits from immerda. I've been pretty verbose about it in redmine so I won't repeat it all here. For details, see:
https://labs.riseup.net/code/issues/4132
Diffstat (limited to 'manifests/host.pp')
-rw-r--r-- | manifests/host.pp | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/manifests/host.pp b/manifests/host.pp index 05dcb5e..9831052 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -2,43 +2,46 @@ # Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at> # See LICENSE for the full license granted to you. -class munin::host( - $cgi_graphing = false, - $export_tag = 'munin' -) { - package {"munin": ensure => installed, } - include concat::setup +class munin::host { + + 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 + if $munin::cgi_graphing { + class {'munin::host::cgi': + owner => $munin::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 { + + if $munin::manage_shorewall { include shorewall::rules::out::munin } } |