X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmunin%2Fmanifests%2Finit.pp;h=2522138345fe1e83e0325bbf781fdf7b548be8b6;hb=2ff27487c60b5ef050465fcc9ad7359bcf3af0af;hp=8258f9b13248eab8ee0c2ae91971f0ffa141f42b;hpb=0ad5c1956a6e44f1d7ef04641a6fa0b03a6bec34;p=mirror%2Fdsa-puppet.git diff --git a/modules/munin/manifests/init.pp b/modules/munin/manifests/init.pp index 8258f9b13..252213834 100644 --- a/modules/munin/manifests/init.pp +++ b/modules/munin/manifests/init.pp @@ -11,14 +11,12 @@ class munin { $owner = $::lsbdistcodename ? { squeeze => munin, - wheezy => root, - undef => munin, + default => root, } $gid = $::lsbdistcodename ? { squeeze => adm, - wheezy => 'www-data', - undef => adm, + default => 'www-data', } file { '/var/log/munin': @@ -40,6 +38,11 @@ class munin { notify => Service['munin-node'], } + file { '/etc/logrotate.d/munin-node': + source => 'puppet:///modules/munin/logrotate', + require => Package['munin-node'], + } + file { [ '/etc/munin/plugins/df', '/etc/munin/plugins/df_abs', '/etc/munin/plugins/df_inode' ]: source => 'puppet:///modules/munin/df-wrap', mode => '0555', @@ -62,18 +65,26 @@ class munin { @@munin::master-per-node { $::fqdn: - ipaddress => $::ipaddress, + ipaddress => $::ipaddress, munin_async => $::munin_async, ; } - if $munin_async and $munin_async == 'true' { - file { '/etc/ssh/userkeys/munin-async': - source => 'puppet:///modules/munin/munin-async-authkeys', + #if $::munin_async and str2bool($::munin_async) == true { + # file { '/etc/ssh/userkeys/munin-async': + # source => 'puppet:///modules/munin/munin-async-authkeys', + # } + #} else { + # file { '/etc/ssh/userkeys/munin-async': + # ensure => 'absent', + # } + #} + if $::lsbmajdistrelease == "testing" or $::lsbmajdistrelease >= 7 { + package { 'munin-async': + ensure => installed } - } else { file { '/etc/ssh/userkeys/munin-async': - ensure => 'absent', + source => 'puppet:///modules/munin/munin-async-authkeys', } } }