From 0459ebace52184319f80241ec0b569588ca09cb8 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Thu, 23 Apr 2015 15:55:30 -0700 Subject: [PATCH] MODULES-1933: fixes backup passing in fragments without concat resource --- manifests/fragment.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manifests/fragment.pp b/manifests/fragment.pp index f9ee2a7ca..7b13b0042 100644 --- a/manifests/fragment.pp +++ b/manifests/fragment.pp @@ -57,7 +57,13 @@ if $backup { warning('The $backup parameter to concat::fragment is deprecated and has no effect') } + $my_backup = concat_getparam(Concat[$target], 'backup') + $_backup = $my_backup ? { + '' => undef, + default => $my_backup + } + if $ensure == undef { $my_ensure = concat_getparam(Concat[$target], 'ensure') } else { @@ -119,7 +125,7 @@ mode => $fragmode, source => $source, content => $content, - backup => $my_backup, + backup => $_backup, replace => true, alias => "concat_fragment_${name}", notify => Exec["concat_${target}"]