fix dumb typo
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@62 f03ff2f1-f02d-0410-970d-b9634babeaa1
This commit is contained in:
parent
1c856bb6fb
commit
7e5b55bde5
1 changed files with 27 additions and 0 deletions
27
manifests/defines/concatenated_file.pp
Normal file
27
manifests/defines/concatenated_file.pp
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# common/manifests/defines/concatenated_file.pp -- create a file from snippets
|
||||||
|
# stored in a directory
|
||||||
|
#
|
||||||
|
# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
|
||||||
|
# See LICENSE for the full license granted to you.
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
# concatenated_file { "/etc/some.conf":
|
||||||
|
# dir => "/etc/some.conf.d",
|
||||||
|
# }
|
||||||
|
define concatenated_file ( $dir, $mode = 0644, $owner = root, $group = root ) {
|
||||||
|
file {
|
||||||
|
$dir:
|
||||||
|
ensure => directory, checksum => mtime,
|
||||||
|
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 | xargs -0 cat > ${name}":
|
||||||
|
refreshonly => true,
|
||||||
|
subscribe => File[$dir],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue