diff options
author | david <david@f03ff2f1-f02d-0410-970d-b9634babeaa1> | 2007-08-06 06:33:19 +0000 |
---|---|---|
committer | david <david@f03ff2f1-f02d-0410-970d-b9634babeaa1> | 2007-08-06 06:33:19 +0000 |
commit | f7c440572b6b889770805f78f6ff903b98857fbb (patch) | |
tree | 000836455cbaac1075b5b068af600ced7ea2ab72 /manifests | |
parent | 237d7fa76533bf504bbec2a57cad7c96410688ec (diff) | |
download | puppet-common-f7c440572b6b889770805f78f6ff903b98857fbb.tar.gz puppet-common-f7c440572b6b889770805f78f6ff903b98857fbb.tar.bz2 |
add refreshonly and notifies; minor shell fixes
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@167 f03ff2f1-f02d-0410-970d-b9634babeaa1
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/defines/concatenated_file.pp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/manifests/defines/concatenated_file.pp b/manifests/defines/concatenated_file.pp index eeed8dc..625cff7 100644 --- a/manifests/defines/concatenated_file.pp +++ b/manifests/defines/concatenated_file.pp @@ -22,17 +22,19 @@ define concatenated_file ( source => "puppet://$servername/common/empty", checksum => mtime, recurse => true, purge => true, force => true, - mode => $mode, owner => $owner, group => $group; + mode => $mode, owner => $owner, group => $group, + notify => Exec["concat_${name}"]; $name: ensure => present, checksum => md5, mode => $mode, owner => $owner, group => $group; } - exec { "/usr/bin/find ${dir} -maxdepth 1 -type f ! -name '*puppettmp' -print0 | sort -z | xargs -0 cat > ${name}": - # refreshonly => true, + # use >| to force clobbering the target file + 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}", + alias => [ "concat_${name}", "concat_${dir}"] , } } @@ -49,6 +51,7 @@ define concatenated_file_part ( ensure => $ensure, content => $content, mode => $mode, owner => $owner, group => $group, alias => "cf_part_${name}", + notify => Exec["concat_${dir}"], } } |