try to order these a bit
[mirror/dsa-puppet.git] / modules / munin / manifests / init.pp
1 class munin {
2
3         package { 'munin-node':
4                 ensure => installed
5         }
6
7         service { 'munin-node':
8                 ensure  => running,
9                 require => Package['munin-node'],
10         }
11
12         file { '/etc/munin/munin-node.conf':
13                 content => template('munin/munin-node.conf.erb'),
14                 require => Package['munin-node'],
15                 notify  => Service['munin-node'],
16         }
17
18         file { '/etc/munin/plugin-conf.d/munin-node':
19                 content => template('munin/munin-node.plugin.conf.erb'),
20                 require => Package['munin-node'],
21                 notify  => Service['munin-node'],
22         }
23
24         file { [ '/etc/munin/plugins/df', '/etc/munin/plugins/df_abs', '/etc/munin/plugins/df_inode' ]:
25                 source => 'puppet:///modules/munin/df-wrap',
26                 mode    => '0555',
27                 require => Package['munin-node'],
28                 notify  => Service['munin-node'],
29         }
30
31         @ferm::rule { 'dsa-munin-v4':
32                 description     => 'Allow munin from munin master',
33                 rule            => 'proto tcp mod state state (NEW) dport (munin) @subchain \'munin\' { saddr ($HOST_MUNIN_V4 $HOST_NAGIOS_V4) ACCEPT; }',
34                 notarule        => true,
35         }
36
37         @ferm::rule { 'dsa-munin-v6':
38                 description     => 'Allow munin from munin master',
39                 domain          => 'ip6',
40                 rule            => 'proto tcp mod state state (NEW) dport (munin) @subchain \'munin\' { saddr ($HOST_MUNIN_V6 $HOST_NAGIOS_V6) ACCEPT; }',
41                 notarule        => true,
42         }
43 }