]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/munin/manifests/init.pp
Start with a storeconf munin thing
[dsa-puppet.git] / modules / munin / manifests / init.pp
index ee50bd0a3109ba2dcda57f4b48e5d1fa0f3803ad..d5df24ef8741b23fd137cc813613b6434633f21b 100644 (file)
@@ -9,6 +9,25 @@ class munin {
                require => Package['munin-node'],
        }
 
+       $owner = $::lsbdistcodename ? {
+               squeeze => munin,
+               wheezy  => root,
+               undef => munin,
+       }
+
+       $gid = $::lsbdistcodename ? {
+               squeeze => adm,
+               wheezy  => 'www-data',
+               undef => adm,
+       }
+
+       file { '/var/log/munin':
+               ensure => directory,
+               owner  => $owner,
+               group  => $gid,
+               mode   => '0755',
+       }
+
        file { '/etc/munin/munin-node.conf':
                content => template('munin/munin-node.conf.erb'),
                require => Package['munin-node'],
@@ -40,4 +59,6 @@ class munin {
                rule            => 'proto tcp mod state state (NEW) dport (munin) @subchain \'munin\' { saddr ($HOST_MUNIN_V6 $HOST_NAGIOS_V6) ACCEPT; }',
                notarule        => true,
        }
+
+       @@munin::master-per-node { $::fqdn: }
 }