From 36c4109ac25d8552165f8a3779461d1bf52a1d25 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sat, 17 Oct 2009 17:04:32 +0100 Subject: [PATCH 1/1] stupid puppet failing to take default values Signed-off-by: Stephen Gran --- modules/munin-node/manifests/init.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/munin-node/manifests/init.pp b/modules/munin-node/manifests/init.pp index 9035878f4..587f15774 100644 --- a/modules/munin-node/manifests/init.pp +++ b/modules/munin-node/manifests/init.pp @@ -1,8 +1,13 @@ define activate_munin_check($ensure=present, script=$name) { + case $script { + "": { $base = $name } + default: { $base = $script } + } + case $ensure { present: { file { "/etc/munin/plugins/$name": - ensure => "/usr/share/munin/plugins/$script", + ensure => "/usr/share/munin/plugins/$base", notify => Exec["munin-node restart"]; } } -- 2.20.1