X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmunin%2Fmanifests%2Fmaster.pp;h=7b35b447254e3ed87a26f654ab40defc7f4e2bee;hb=16f159df93f2125246d86d82d5ce4976e36ab66c;hp=6f606e3712bd51bafa3e4ad3690c56edd5210c50;hpb=996a1160f23dbaf10a537e6502f75a0dd1dbc0b2;p=mirror%2Fdsa-puppet.git diff --git a/modules/munin/manifests/master.pp b/modules/munin/manifests/master.pp index 6f606e371..7b35b4472 100644 --- a/modules/munin/manifests/master.pp +++ b/modules/munin/manifests/master.pp @@ -1,21 +1,42 @@ +# munin master node class munin::master { + package { 'munin': + ensure => installed + } - package { 'munin': - ensure => installed - } + ssh::keygen { 'munin' : } + ssh::authorized_key_add { 'munin-async-fetcher': + target_user => 'munin-async', + key => dig($facts, 'ssh_keys_users', 'munin', 'id_rsa.pub', 'line'), + command => '/usr/share/munin/munin-async --spoolfetch', + from => $base::public_addresses, + collect_tag => 'munin::munin-async-fetch' + } - file { '/etc/munin/munin.conf': - content => template('munin/munin.conf.erb'), - require => Package['munin']; - } + file { '/etc/munin/munin.conf': + content => template('munin/munin.conf.erb'), + require => Package['munin']; + } - if $::hostname == 'menotti' { - file { '/etc/munin/munin-conf.d': - ensure => directory, - mode => 755, - ; - } + ssl::service { 'munin.debian.org': + notify => Exec['service apache2 reload'], + key => true, + } + file { '/etc/munin/munin-conf.d': + ensure => directory, + mode => '0755', + purge => true, + force => true, + recurse => true, + source => 'puppet:///files/empty/', + } - Munin::Master-per-node<<| |>> - } + Munin::Master_per_node<<| |>> + + file { '/etc/cron.d/puppet-munin-cleanup': ensure => absent; } + + concat::fragment { 'puppet-crontab--munin-master': + target => '/etc/cron.d/puppet-crontab', + source => 'puppet:///modules/munin/master-cleanup-cron', + } }