From 550b18c797113d0d3ebad08d5ba5f4b3f78674ed Mon Sep 17 00:00:00 2001 From: david Date: Sun, 29 Jul 2007 10:35:34 +0000 Subject: [PATCH] fixed up refresh behaviour, still have to run the concat every time, but requirors are signalled only when the md5 changes git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@126 f03ff2f1-f02d-0410-970d-b9634babeaa1 --- manifests/defines/concatenated_file.pp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/manifests/defines/concatenated_file.pp b/manifests/defines/concatenated_file.pp index 2c43bf0..35590fa 100644 --- a/manifests/defines/concatenated_file.pp +++ b/manifests/defines/concatenated_file.pp @@ -19,18 +19,19 @@ define concatenated_file ( { file { $dir: - ensure => directory, checksum => mtime, - ## This doesn't work as expected - #recurse => true, purge => true, noop => true, + source => "puppet://$servername/common/empty", + checksum => mtime, + recurse => true, purge => true, mode => $mode, owner => $owner, group => $group; $name: ensure => present, checksum => md5, mode => $mode, owner => $owner, group => $group; } - exec { "find ${dir} -maxdepth 1 -type f ! -name '*puppettmp' -print0 | sort -z | xargs -0 cat > ${name}": - refreshonly => true, + exec { "/usr/bin/find ${dir} -maxdepth 1 -type f ! -name '*puppettmp' -print0 | sort -z | xargs -0 cat > ${name}": + # refreshonly => true, subscribe => File[$dir], + before => File[$name], alias => "concat_${name}", } }