node "toto.example.com" {
include postfix
- postfix::header_checks {
+ postfix::header_checks_snippet {
'wrong_date': content => 'FIXME';
'bla': source => 'puppet:///files/etc/postfix/header_checks.d/bla';
}
fail("Only one of \$source or \$content must specified for postfix::header_checks_snippet ${name}")
}
- if ($value == false) and ($ensure == "present") {
- fail("The value parameter must be set when using the postfix::header_checks_snippet define with ensure=present.")
- }
-
include postfix::header_checks
- $snippetfile = "${postfix::header_checks::postfix_header_checks_snippets_dir}/${name}"
-
- file { "$snippetfile":
+ $fragment = "postfix_header_checks_${name}"
+
+ concat::fragment { "$fragment":
ensure => "$ensure",
- mode => 600,
- owner => root,
- group => 0,
- notify => Exec["concat_${postfix::header_checks::postfix_merged_header_checks}"],
+ target => '/etc/postfix/header_checks',
}
if $source {
- File["$snippetfile"] {
+ Concat::Fragment["$fragment"] {
source => $source,
}
}
else {
- File["$snippetfile"] {
+ Concat::Fragment["$fragment"] {
content => $content,
}
}