summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-07-22 21:14:46 +0000
committermh <mh@immerda.ch>2008-07-22 21:14:46 +0000
commitf333f2ab43ea1c4d8abae333cff1a4f3471d90e7 (patch)
treee29ce2d21362daec4d7e092b700928dd0c39cfe4 /manifests
parentedf55dda28e3642fd9fc849bcfd91f09e3844161 (diff)
merged with immerda
Diffstat (limited to 'manifests')
-rw-r--r--manifests/host.pp31
-rw-r--r--manifests/plugin.pp2
2 files changed, 32 insertions, 1 deletions
diff --git a/manifests/host.pp b/manifests/host.pp
index 8f79020..fdaa255 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -8,6 +8,16 @@ class munin::host
File <<| tag == 'munin' |>>
+ file{'/etc/munin/munin.conf.header':
+ source => [ "puppet://$server/files/munin/config/host/${fqdn}/munin.conf.header",
+ "puppet://$server/files/munin/config/host/munin.conf.header.$operatingsystem",
+ "puppet://$server/files/munin/config/host/munin.conf.header",
+ "puppet://$server/munin/config/host/munin.conf.header.$operatingsystem",
+ "puppet://$server/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 => $NODESDIR,
header => "/etc/munin/munin.conf.header",
@@ -20,6 +30,27 @@ class munin::host
}
include munin::plugins::muninhost
+
+ case $operatingsystem {
+ centos: { include munin::host::cgi }
+ }
+}
+
+class munin::host::cgi {
+ exec{'set_modes_for_cgi':
+ command => 'chgrp apache /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R apache {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;',
+ refreshonly => true,
+ subscribe => File['/etc/munin/munin.conf.header'],
+ }
+
+ file{'/etc/logrotate.d/munin':
+ source => [ "puppet://$server/files/munin/config/host/${fqdn}/logrotate",
+ "puppet://$server/files/munin/config/host/logrotate.$operatingsystem",
+ "puppet://$server/files/munin/config/host/logrotate",
+ "puppet://$server/munin/config/host/logrotate.$operatingsystem",
+ "puppet://$server/munin/config/host/logrotate" ],
+ owner => root, group => 0, mode => 0644;
+ }
}
class munin::snmp_collector
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index 2065c79..4940eaf 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -137,7 +137,7 @@ class munin::plugins::base {
file {
[ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]:
source => "puppet://$server/common/empty",
- ignore => '.ignore',
+ ignore => '\.ignore',
ensure => directory, checksum => mtime,
recurse => true, purge => true, force => true,
mode => 0755, owner => root, group => 0,