e1a57d93f54fc4e98f6b9fed746b9f6663ca60dd
[puppet_munin.git] / manifests / plugins / setup.pp
1 # Set up the munin plugins for a node
2 class munin::plugins::setup {
3
4   file {
5     [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]:
6       ensure    => directory,
7       require   => Anchor['munin::client::installed'],
8       ignore    => 'snmp_*',
9       checksum  => mtime,
10       recurse   => true,
11       purge     => true,
12       force     => true,
13       notify    => Service['munin-node'],
14       owner     => root,
15       group     => 0,
16       mode      => '0755';
17     '/etc/munin/plugin-conf.d/munin-node':
18       ensure    => present,
19       require   => Anchor['munin::client::installed'],
20       notify    => Service['munin-node'],
21       owner     => root,
22       group     => 0,
23       mode      => '0640';
24   }
25   case $::kernel {
26     openbsd: {
27       File['/etc/munin/plugin-conf.d/munin-node']{
28         before => File['/var/run/munin'],
29       }
30     }
31     default: {
32       File['/etc/munin/plugin-conf.d/munin-node']{
33         before => Package['munin-node'],
34       }
35     }
36   }
37 }