summaryrefslogtreecommitdiff
path: root/manifests/host.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-17 16:36:37 -0400
committerMicah Anderson <micah@riseup.net>2013-04-17 16:36:37 -0400
commit8f7c0071eb82591477876eeb3f309067853a3261 (patch)
treeb095f01b960b7ba3699da2dfa4d84cd5bb8a6361 /manifests/host.pp
parentea31faee76141646c173d88bd5bec5aa4a773c1c (diff)
parenta5ce0a9317fc5dd5228cff4c5b6d36366c17b6d5 (diff)
Merge branch 'master' into leap
Conflicts: README manifests/host/cgi.pp
Diffstat (limited to 'manifests/host.pp')
-rw-r--r--manifests/host.pp54
1 files changed, 24 insertions, 30 deletions
diff --git a/manifests/host.pp b/manifests/host.pp
index 9d30d6a..05dcb5e 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -2,40 +2,35 @@
# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
# See LICENSE for the full license granted to you.
-class munin::host inherits munin
-{
+class munin::host(
+ $cgi_graphing = false,
+ $export_tag = 'munin'
+) {
+ package {"munin": ensure => installed, }
+ include concat::setup
- if $munin_ensure_version == '' { $munin_ensure_version = 'installed' }
+ Concat::Fragment <<| tag == $export_tag |>>
- package {"munin": ensure => $munin_ensure_version, }
-
- 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",
+ 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}",
+ "puppet:///modules/site_munin/config/host/munin.conf.header",
+ "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}",
+ "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;
+ order => 05,
}
-
- 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;
+
+ concat{ "/etc/munin/munin.conf":
+ owner => root, group => 0, mode => 0644;
}
-
+
include munin::plugins::muninhost
-
- case $operatingsystem {
- centos: { include munin::host::cgi }
+
+ if $munin::host::cgi_graphing {
+ include munin::host::cgi
}
# from time to time we cleanup hanging munin-runs
@@ -43,8 +38,7 @@ class munin::host inherits munin
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 {
+ if $munin::host::manage_shorewall {
include shorewall::rules::out::munin
}
}