}
# if there is a header or footer file, add it
- $additional_cmd = "$header" ? {
+ $additional_cmd = $header ? {
'' => $footer ? {
'' => '',
default => "| cat - '${footer}' "
}
# use >| to force clobbering the target file
- exec { "/usr/bin/find ${dir} -maxdepth 1 -type f ! -name '*puppettmp' -print0 | sort -z | xargs -0 cat ${header_cmd} >| ${name}.puppettmp":
+ exec { "/usr/bin/find ${dir} -maxdepth 1 -type f ! -name '*puppettmp' -print0 | sort -z | xargs -0 cat ${additional_cmd} >| ${name}":
refreshonly => true,
subscribe => File[$dir],
before => File[$name],
# See LICENSE for the full license granted to you.
define puppet::function($source) {
- $destination = $type ? {
- "fact" => "${rubysitedir}/facter/${name}.rb",
- }
file {
"${rubysitedir}/puppet/parser/functions/${name}.rb":
source => $source,