From 14b9d60ed88376a87c5643ea6731d5b0902ad312 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 18 Oct 2009 00:14:16 +0100 Subject: [PATCH] change plugin.conf to template Signed-off-by: Stephen Gran --- modules/munin-node/manifests/init.pp | 3 +- .../munin-node.plugin.conf.erb} | 30 +++++++++++++++---- 2 files changed, 26 insertions(+), 7 deletions(-) rename modules/munin-node/{files/common/munin-node.plugin.conf => templates/munin-node.plugin.conf.erb} (72%) diff --git a/modules/munin-node/manifests/init.pp b/modules/munin-node/manifests/init.pp index d6336c853..020b82700 100644 --- a/modules/munin-node/manifests/init.pp +++ b/modules/munin-node/manifests/init.pp @@ -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/files/common/munin-node.plugin.conf b/modules/munin-node/templates/munin-node.plugin.conf.erb similarity index 72% rename from modules/munin-node/files/common/munin-node.plugin.conf rename to modules/munin-node/templates/munin-node.plugin.conf.erb index 907723f60..07dc7b226 100644 --- a/modules/munin-node/files/common/munin-node.plugin.conf +++ b/modules/munin-node/templates/munin-node.plugin.conf.erb @@ -17,10 +17,16 @@ group adm, maillog [cps*] user root - +<%= +out = "" +if mx == "exim4" + out=" [exim_mail*] -user (Debian-exim) -group maillog +user Debian-exim +group maillog" +end +out +%> [fw_conntrack] user root @@ -44,15 +50,22 @@ user root user root env.mysqlopts --defaults-extra-file=/etc/mysql/debian.cnf +<%= +out = "" +if mx == "postfix" + out=" [postfix_mailqueue] -user (postfix) +user postfix [postfix_mailstats] group adm, maillog [postfix_mailvolume] group adm, maillog -env.logfile mail.log +env.logfile mail.log" +end +out +%> [smart_*] user root @@ -63,3 +76,10 @@ user root [spamassassin] group maillog +[bind] +<%= +out = case node + when geo1,geo2,geo3 then "env.logfile=/var/log/bind9/geoip-query.log" +end +out +%> -- 2.20.1