From b7ae0d3568c36ee2ec66ff288ba3b89b3ca96ed6 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 20 May 2012 08:56:13 +0100 Subject: [PATCH] we should probably add content as well Signed-off-by: Stephen Gran --- modules/munin/manifests/conf.pp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/munin/manifests/conf.pp b/modules/munin/manifests/conf.pp index a4ac0ab7e..ad557abe2 100644 --- a/modules/munin/manifests/conf.pp +++ b/modules/munin/manifests/conf.pp @@ -16,9 +16,19 @@ define munin::conf ( default: { fail ( "Unknown ensure value: '$ensure'" ) } } - file { "/etc/munin/plugin-conf.d/${name}": - ensure => $ensure, - require => Package['munin-node'], - notify => Service['munin-node'], + if $source { + file { "/etc/munin/plugin-conf.d/${name}": + ensure => $ensure, + source => $source, + require => Package['munin-node'], + notify => Service['munin-node'], + } + } elsif $content { + file { "/etc/munin/plugin-conf.d/${name}": + ensure => $ensure, + content => $content, + require => Package['munin-node'], + notify => Service['munin-node'], + } } } -- 2.20.1