diff options
author | mh <mh@immerda.ch> | 2010-07-15 20:41:39 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2010-07-15 20:41:39 +0200 |
commit | dab730ed6b0667d4356c0e8e21e37719ea977a93 (patch) | |
tree | a00789980ad6bb8cbf27bf41c31de8c88dfb9171 /manifests/plugins/base.pp | |
parent | e7d23dabf191c5416197af0b229fc90b94539405 (diff) |
fixing weird class setup
we had some weird class setup which caused some problems on 2.6
(see puppet bug #4242 for more info). This commit cleans that
weird setup up and decouples a lot of things.
Diffstat (limited to 'manifests/plugins/base.pp')
-rw-r--r-- | manifests/plugins/base.pp | 63 |
1 files changed, 19 insertions, 44 deletions
diff --git a/manifests/plugins/base.pp b/manifests/plugins/base.pp index 4658acc..bfccae5 100644 --- a/manifests/plugins/base.pp +++ b/manifests/plugins/base.pp @@ -1,50 +1,25 @@ class munin::plugins::base { - file { - [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]: - source => "puppet://$server/modules/common/empty", - ignore => [ '\.ignore', 'snmp_*' ], - ensure => directory, checksum => mtime, - recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => 0, - notify => Service['munin-node']; - '/etc/munin/plugin-conf.d/munin-node': - ensure => present, - mode => 0644, owner => root, group => 0, - notify => Service['munin-node'], - } - munin::plugin { - [ df, cpu, interrupts, load, memory, netstat, open_files, - processes, swap, uptime, users, vmstat - ]: + # setup basic plugins + munin::plugin { + [ df, cpu, interrupts, load, memory, netstat, open_files, + processes, swap, uptime, users, vmstat ]: ensure => present, - } - include munin::plugins::interfaces + } + include munin::plugins::interfaces - case $kernel { - openbsd: { - File['/etc/munin/plugin-conf.d/munin-node']{ - before => File['/var/run/munin'], - } - } - default: { - File['/etc/munin/plugin-conf.d/munin-node']{ - before => Package['munin-node'], - } - } - } - case $kernel { - linux: { - case $vserver { - guest: { include munin::plugins::vserver } - default: { - include munin::plugins::linux - } - } - } - } - case $virtual { - physical: { include munin::plugins::physical } - xen0: { include munin::plugins::dom0 } + case $kernel { + openbsd: { include munin::plugins::openbsd } + linux: { + case $vserver { + guest: { include munin::plugins::vserver } + default: { include munin::plugins::linux } + } } + } + + case $virtual { + physical: { include munin::plugins::physical } + xen0: { include munin::plugins::dom0 } + } } |