change plugin.conf to template
authorStephen Gran <steve@lobefin.net>
Sat, 17 Oct 2009 23:14:16 +0000 (00:14 +0100)
committerStephen Gran <steve@lobefin.net>
Sat, 17 Oct 2009 23:14:16 +0000 (00:14 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/munin-node/files/common/munin-node.plugin.conf [deleted file]
modules/munin-node/manifests/init.pp
modules/munin-node/templates/munin-node.plugin.conf.erb [new file with mode: 0644]

diff --git a/modules/munin-node/files/common/munin-node.plugin.conf b/modules/munin-node/files/common/munin-node.plugin.conf
deleted file mode 100644 (file)
index 907723f..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-##
-## 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
-##
-
-[apt]
-user root
-
-[courier_mta_mailqueue]
-group daemon
-
-[courier_mta_mailstats]
-group adm, maillog
-
-[courier_mta_mailvolume]
-group adm, maillog
-
-[cps*]
-user root
-
-[exim_mail*]
-user (Debian-exim)
-group maillog
-
-[fw_conntrack]
-user root
-
-[fw_forwarded_local]
-user root
-
-[hddtemp_smartctl]
-user root
-
-[if_*]
-user root
-
-[if_err_*]
-user nobody
-
-[ip_*]
-user root
-
-[mysql*]
-user root
-env.mysqlopts --defaults-extra-file=/etc/mysql/debian.cnf
-
-[postfix_mailqueue]
-user (postfix)
-
-[postfix_mailstats]
-group adm, maillog
-
-[postfix_mailvolume]
-group adm, maillog
-env.logfile mail.log
-
-[smart_*]
-user root
-
-[vlan*]
-user root
-
-[spamassassin]
-group maillog
-
index d6336c8..020b827 100644 (file)
@@ -60,8 +60,7 @@ class munin-node {
             notify  => Exec["munin-node restart"];
 
         "/etc/munin/plugin-conf.d/munin-node":
-            source  => [ "puppet:///munin-node/per-host/$fqdn/munin-node.plugin.conf",
-                         "puppet:///munin-node/common/munin-node.plugin.conf" ],
+            content => template("munin/munin-node.plugin.conf.erb"),
             require => Package["munin-node"],
             notify  => Exec["munin-node restart"];
     }
diff --git a/modules/munin-node/templates/munin-node.plugin.conf.erb b/modules/munin-node/templates/munin-node.plugin.conf.erb
new file mode 100644 (file)
index 0000000..07dc7b2
--- /dev/null
@@ -0,0 +1,85 @@
+##
+## 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
+##
+
+[apt]
+user root
+
+[courier_mta_mailqueue]
+group daemon
+
+[courier_mta_mailstats]
+group adm, maillog
+
+[courier_mta_mailvolume]
+group adm, maillog
+
+[cps*]
+user root
+<%=
+out = ""
+if mx == "exim4"
+  out="
+[exim_mail*]
+user Debian-exim
+group maillog"
+end
+out
+%>
+
+[fw_conntrack]
+user root
+
+[fw_forwarded_local]
+user root
+
+[hddtemp_smartctl]
+user root
+
+[if_*]
+user root
+
+[if_err_*]
+user nobody
+
+[ip_*]
+user root
+
+[mysql*]
+user root
+env.mysqlopts --defaults-extra-file=/etc/mysql/debian.cnf
+
+<%=
+out = ""
+if mx == "postfix"
+  out="
+[postfix_mailqueue]
+user postfix
+
+[postfix_mailstats]
+group adm, maillog
+
+[postfix_mailvolume]
+group adm, maillog
+env.logfile mail.log"
+end
+out
+%>
+
+[smart_*]
+user root
+
+[vlan*]
+user root
+
+[spamassassin]
+group maillog
+
+[bind]
+<%=
+out = case node
+  when geo1,geo2,geo3 then "env.logfile=/var/log/bind9/geoip-query.log"
+end
+out
+%>