]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Start with a storeconf munin thing
authorPeter Palfrader <peter@palfrader.org>
Mon, 27 Aug 2012 09:27:19 +0000 (09:27 +0000)
committerPeter Palfrader <peter@palfrader.org>
Mon, 27 Aug 2012 09:27:19 +0000 (09:27 +0000)
modules/munin/manifests/init.pp
modules/munin/manifests/master-per-node.pp [new file with mode: 0644]
modules/munin/manifests/master.pp
modules/munin/templates/munin.conf-per-node.erb [new file with mode: 0644]

index 62805de2b2872ba1e6d41480aa9f8cb3f3d07fd7..d5df24ef8741b23fd137cc813613b6434633f21b 100644 (file)
@@ -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 (file)
index 0000000..5f8dee9
--- /dev/null
@@ -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'),
+       }
+}
index 4706dfbfb2113ee343f8299ab28642678b485138..6f606e3712bd51bafa3e4ad3690c56edd5210c50 100644 (file)
@@ -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 (file)
index 0000000..e163d29
--- /dev/null
@@ -0,0 +1,6 @@
+##
+### THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+##
+
+[<%= fqdn %>]
+    address <%= ipaddress %>