From: Silvio Rhatto Date: Sat, 30 Dec 2017 15:34:31 +0000 (-0200) Subject: Fix 'No content, source or symlink specified' concat error X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=1e53f6be6cb823a08c1a544e20d8f0c6543a3fea;p=puppet-postfix.git Fix 'No content, source or symlink specified' concat error --- diff --git a/manifests/header_checks_snippet.pp b/manifests/header_checks_snippet.pp index 05929a3..82ead84 100644 --- a/manifests/header_checks_snippet.pp +++ b/manifests/header_checks_snippet.pp @@ -44,17 +44,13 @@ define postfix::header_checks_snippet ( concat::fragment { "$fragment": ensure => "$ensure", target => '/etc/postfix/header_checks', + source => $source ? { + undef => undef, + default => $source, + }, + content => $content ? { + undef => undef, + default => $content, + }, } - - if $source { - Concat::Fragment["$fragment"] { - source => $source, - } - } - else { - Concat::Fragment["$fragment"] { - content => $content, - } - } - } diff --git a/manifests/transport_regexp_snippet.pp b/manifests/transport_regexp_snippet.pp index 88c72e1..1588c00 100644 --- a/manifests/transport_regexp_snippet.pp +++ b/manifests/transport_regexp_snippet.pp @@ -44,17 +44,13 @@ define postfix::transport_regexp_snippet ( concat::fragment { "$fragment": ensure => "$ensure", target => '/etc/postfix/transport_regexp', + source => $source ? { + undef => undef, + default => $source, + }, + content => $content ? { + undef => undef, + default => $content, + }, } - - if $source { - Concat::Fragment["$fragment"] { - source => $source, - } - } - else { - Concat::Fragment["$fragment"] { - content => $content, - } - } - } diff --git a/manifests/virtual_regexp_snippet.pp b/manifests/virtual_regexp_snippet.pp index 6252fd2..8e376b7 100644 --- a/manifests/virtual_regexp_snippet.pp +++ b/manifests/virtual_regexp_snippet.pp @@ -44,17 +44,13 @@ define postfix::virtual_regexp_snippet ( concat::fragment { "$fragment": ensure => "$ensure", target => '/etc/postfix/virtual_regexp', + source => $source ? { + undef => undef, + default => $source, + }, + content => $content ? { + undef => undef, + default => $content, + }, } - - if $source { - Concat::Fragment["$fragment"] { - source => $source, - } - } - else { - Concat::Fragment["$fragment"] { - content => $content, - } - } - }