summaryrefslogtreecommitdiff
path: root/manifests/host.pp
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2011-05-07 17:25:17 +0200
committerintrigeri <intrigeri@boum.org>2011-05-07 17:25:17 +0200
commit86d85a63c11cf58ba3b3510b038dcafea9fc7573 (patch)
tree1013b1ef64087bab38182c5404bb3e072b54022d /manifests/host.pp
parente922cee6daebfa27759f38d58ba5f89a42b149af (diff)
parente17c0e0fae335470971cc628d71a798d168e70af (diff)
Merge remote branch 'riseup/master'
Diffstat (limited to 'manifests/host.pp')
-rw-r--r--manifests/host.pp58
1 files changed, 31 insertions, 27 deletions
diff --git a/manifests/host.pp b/manifests/host.pp
index e038fd7..9d30d6a 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -4,42 +4,46 @@
class munin::host inherits munin
{
- package {"munin": ensure => installed, }
- File <<| tag == 'munin' |>>
+ if $munin_ensure_version == '' { $munin_ensure_version = 'installed' }
- file{'/etc/munin/munin.conf.header':
- source => [ "puppet:///modules/site-munin/config/host/${fqdn}/munin.conf.header",
- "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",
- "puppet:///modules/munin/config/host/munin.conf.header" ],
- notify => Exec['concat_/etc/munin/munin.conf'],
- owner => root, group => 0, mode => 0644;
- }
+ package {"munin": ensure => $munin_ensure_version, }
- concatenated_file { "/etc/munin/munin.conf":
- dir => '/var/lib/puppet/modules/munin/nodes',
- header => "/etc/munin/munin.conf.header",
- }
-
- file { ["/var/log/munin-update.log", "/var/log/munin-limits.log",
- "/var/log/munin-graph.log", "/var/log/munin-html.log"]:
- ensure => present,
- mode => 640, owner => munin, group => 0;
- }
-
- include munin::plugins::muninhost
-
- case $operatingsystem {
- centos: { include munin::host::cgi }
- }
+ File <<| tag == 'munin' |>>
+
+ file{'/etc/munin/munin.conf.header':
+ source => [ "puppet:///modules/site-munin/config/host/${fqdn}/munin.conf.header",
+ "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",
+ "puppet:///modules/munin/config/host/munin.conf.header" ],
+ notify => Exec['concat_/etc/munin/munin.conf'],
+ owner => root, group => 0, mode => 0644;
+ }
+
+ concatenated_file { "/etc/munin/munin.conf":
+ dir => '/var/lib/puppet/modules/munin/nodes',
+ header => "/etc/munin/munin.conf.header",
+ }
+
+ file { ["/var/log/munin-update.log", "/var/log/munin-limits.log",
+ "/var/log/munin-graph.log", "/var/log/munin-html.log"]:
+ ensure => present,
+ mode => 640, owner => munin, group => 0;
+ }
+
+ include munin::plugins::muninhost
+
+ case $operatingsystem {
+ centos: { include munin::host::cgi }
+ }
# 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;
}
+
if $use_shorewall {
include shorewall::rules::out::munin
}