From: Peter Palfrader Date: Mon, 27 Aug 2012 09:27:19 +0000 (+0000) Subject: Start with a storeconf munin thing X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=996a1160f23dbaf10a537e6502f75a0dd1dbc0b2;hp=dbc05fea3a598046994dbc58fc66402a25b1aaba;p=dsa-puppet.git Start with a storeconf munin thing --- diff --git a/modules/munin/manifests/init.pp b/modules/munin/manifests/init.pp index 62805de2..d5df24ef 100644 --- a/modules/munin/manifests/init.pp +++ b/modules/munin/manifests/init.pp @@ -59,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: } } diff --git a/modules/munin/manifests/master-per-node.pp b/modules/munin/manifests/master-per-node.pp new file mode 100644 index 00000000..5f8dee9b --- /dev/null +++ b/modules/munin/manifests/master-per-node.pp @@ -0,0 +1,5 @@ +define munin::master-per-node() { + file { "/etc/munin/munin-conf.d/${name}.conf": + content => template('munin/munin.conf-per-node.erb'), + } +} diff --git a/modules/munin/manifests/master.pp b/modules/munin/manifests/master.pp index 4706dfbf..6f606e37 100644 --- a/modules/munin/manifests/master.pp +++ b/modules/munin/manifests/master.pp @@ -8,4 +8,14 @@ class munin::master { content => template('munin/munin.conf.erb'), require => Package['munin']; } + + if $::hostname == 'menotti' { + file { '/etc/munin/munin-conf.d': + ensure => directory, + mode => 755, + ; + } + + Munin::Master-per-node<<| |>> + } } diff --git a/modules/munin/templates/munin.conf-per-node.erb b/modules/munin/templates/munin.conf-per-node.erb new file mode 100644 index 00000000..e163d29f --- /dev/null +++ b/modules/munin/templates/munin.conf-per-node.erb @@ -0,0 +1,6 @@ +## +### THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## + +[<%= fqdn %>] + address <%= ipaddress %>