aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-12-30 13:34:31 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-12-30 13:34:31 -0200
commit1e53f6be6cb823a08c1a544e20d8f0c6543a3fea (patch)
treed6d5ace4f1f86f164a940edfcee568cde5200149
parentc760c9cc29afc2fb5f466fba7047e43c9dd0ef88 (diff)
downloadpuppet-postfix-1e53f6be6cb823a08c1a544e20d8f0c6543a3fea.tar.gz
puppet-postfix-1e53f6be6cb823a08c1a544e20d8f0c6543a3fea.tar.bz2
Fix 'No content, source or symlink specified' concat error
-rw-r--r--manifests/header_checks_snippet.pp20
-rw-r--r--manifests/transport_regexp_snippet.pp20
-rw-r--r--manifests/virtual_regexp_snippet.pp20
3 files changed, 24 insertions, 36 deletions
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,
- }
- }
-
}