From 88d197da8cedd5d711db043995f725ebe66b6ed6 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 13 Jun 2014 12:25:48 +0200 Subject: implement #38 - allow config to be an array --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ef82f90..37d0077 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -32,9 +32,9 @@ define munin::plugin ( seltype => 'munin_etc_t', } } - if $config != '' { + if !empty($config) { file { "/etc/munin/plugin-conf.d/${name}.conf": - content => "[${name}]\n${config}\n", + content => inline_template("[<%= @name %>]\n<%= Array(@config).join(\"\n\") %>\n"), owner => root, group => 0, mode => '0640', -- cgit v1.2.3