X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmunin%2Fmanifests%2Fmaster.pp;h=17729c7d9c2495982d2203cb6182597877ae2531;hb=a2afb600d7d2187b16da01c98a50f00f06aea6a6;hp=2a01854d17da767f4f83839b0b5519552efa9c59;hpb=1cf55805ae9d1a9cbc8bd935a52d8eea1914f8d4;p=mirror%2Fdsa-puppet.git diff --git a/modules/munin/manifests/master.pp b/modules/munin/manifests/master.pp index 2a01854d1..17729c7d9 100644 --- a/modules/munin/manifests/master.pp +++ b/modules/munin/manifests/master.pp @@ -1,25 +1,44 @@ +# munin master node class munin::master { + include apache2 - package { 'munin': - ensure => installed - } + package { 'munin': + ensure => installed + } - file { '/etc/munin/munin.conf': - content => template('munin/munin.conf.erb'), - require => Package['munin']; - } + 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' + } - ssl::service { 'munin.debian.org': - notify => Service['apache2'], - } - file { '/etc/munin/munin-conf.d': - ensure => directory, - mode => '0755', - purge => true, - force => true, - recurse => true, - source => 'puppet:///files/empty/', - } + file { '/etc/munin/munin.conf': + content => template('munin/munin.conf.erb'), + require => Package['munin']; + } - Munin::Master-per-node<<| |>> + 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<<| |>> + + 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', + } }