diff --git a/manifests/fragment.pp b/manifests/fragment.pp index aa85c2cc..e438c5a6 100644 --- a/manifests/fragment.pp +++ b/manifests/fragment.pp @@ -38,10 +38,10 @@ fail("${resource}['${title}']: Can't use 'source' and 'content' at the same time.") } - if $tagging =~ Undef { - $safe_target_name = regsubst($target, '[\\\\/:~\n\s\+\*\(\)@]', '_', 'GM') - } else { + if $tagging { $safe_target_name = $tagging + } else { + $safe_target_name = regsubst($target, '[\\\\/:~\n\s\+\*\(\)@]', '_', 'GM') } concat_fragment { $name: diff --git a/manifests/init.pp b/manifests/init.pp index b1c7ae46..f8d96968 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -126,10 +126,10 @@ } } - if $tagging =~ Undef { - $safe_names = $safe_name - } else { + if $tagging { $safe_names = flatten($safe_name, $tagging) + } else { + $safe_names = $safe_name } if $ensure == 'present' {