summaryrefslogtreecommitdiff
path: root/manifests/plugins/setup.pp
blob: 197b657eee54c7c67ec5b8428ebc0b2970142c41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class munin::plugins::setup {

  # This is required for the munin-node service and package requirements below.
  include munin::client

  file {
    [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]:
      ignore    => 'snmp_*',
      ensure    => directory,
      checksum  => mtime,
      recurse 	=> true,
      purge     => true,
      force     => true,
      notify    => Service['munin-node'],
      owner     => root,
      group     => 0,
      mode      => '0755';
    '/etc/munin/plugin-conf.d/munin-node':
      ensure    => present,
      notify    => Service['munin-node'],
      owner     => root,
      group     => 0,
      mode      => '0640';
  }
  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'],
      }
    }
  }
}