+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-#
-# Example config-file for munin-node
-#
-
-log_level 4
-log_file /var/log/munin/munin-node.log
-port 4949
-pid_file /var/run/munin/munin-node.pid
-background 1
-setseid 1
-
-# Which port to bind to;
-host *
-user root
-group root
-setsid yes
-
-# Regexps for files to ignore
-
-ignore_file ~$
-ignore_file \.bak$
-ignore_file %$
-ignore_file \.dpkg-(tmp|new|old|dist)$
-ignore_file \.rpm(save|new)$
-
-# Set this if the client doesn't report the correct hostname when
-# telnetting to localhost, port 4949
-#
-#host_name localhost.localdomain
-
-# A list of addresses that are allowed to connect. This must be a
-# regular expression, due to brain damage in Net::Server, which
-# doesn't understand CIDR-style network notation. You may repeat
-# the allow line as many times as you'd like
-
-allow ^192\.25\.206\.57$
-allow ^192\.25\.206\.33$
file {
"/etc/munin/munin-node.conf":
- source => [ "puppet:///munin-node/per-host/$fqdn/munin-node.conf",
- "puppet:///munin-node/common/munin-node.conf" ],
+ content => template("munin-node/munin-node.conf.erb"),
require => Package["munin-node"],
notify => Exec["munin-node restart"];
--- /dev/null
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+#
+# Example config-file for munin-node
+#
+
+log_level 4
+log_file /var/log/munin/munin-node.log
+port 4949
+pid_file /var/run/munin/munin-node.pid
+background 1
+setseid 1
+
+# Which port to bind to;
+host *
+user root
+group root
+setsid yes
+
+# Regexps for files to ignore
+
+ignore_file ~$
+ignore_file \.bak$
+ignore_file %$
+ignore_file \.dpkg-(tmp|new|old|dist)$
+ignore_file \.rpm(save|new)$
+
+# Set this if the client doesn't report the correct hostname when
+# telnetting to localhost, port 4949
+#
+#host_name localhost.localdomain
+
+# A list of addresses that are allowed to connect. This must be a
+# regular expression, due to brain damage in Net::Server, which
+# doesn't understand CIDR-style network notation. You may repeat
+# the allow line as many times as you'd like
+
+<%=
+str = ''
+localinfo.keys.sort.each do |node|
+ if localinfo[node]['muninmaster']
+ keyinfo[node][0]['ipHostNumber'].each do |ip|
+ str += "allow " + ip.split('.').join('\.') + "$\n"
+ end
+ end
+end
+str
+-%>