diff options
author | Michael Scherer <misc@mageia.org> | 2011-01-09 11:18:38 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-01-09 11:18:38 +0000 |
commit | 0e351d3ab799d85d16c0ee926bbc05a530247664 (patch) | |
tree | 468c818d3211c9bb75bc51fc62851486f5efd89c /modules/concat/manifests/fragment.pp | |
parent | 96c7d73390935a5950161af190b691615a6c9d06 (diff) | |
download | puppet-0e351d3ab799d85d16c0ee926bbc05a530247664.tar puppet-0e351d3ab799d85d16c0ee926bbc05a530247664.tar.gz puppet-0e351d3ab799d85d16c0ee926bbc05a530247664.tar.bz2 puppet-0e351d3ab799d85d16c0ee926bbc05a530247664.tar.xz puppet-0e351d3ab799d85d16c0ee926bbc05a530247664.zip |
move concat to external ( taken from the web )
Diffstat (limited to 'modules/concat/manifests/fragment.pp')
-rw-r--r-- | modules/concat/manifests/fragment.pp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/modules/concat/manifests/fragment.pp b/modules/concat/manifests/fragment.pp deleted file mode 100644 index 890d43a4..00000000 --- a/modules/concat/manifests/fragment.pp +++ /dev/null @@ -1,51 +0,0 @@ -# Puts a file fragment into a directory previous setup using concat -# -# OPTIONS: -# - target The file that these fragments belong to -# - content If present puts the content into the file -# - source If content was not specified, use the source -# - order By default all files gets a 10_ prefix in the directory -# you can set it to anything else using this to influence the -# order of the content in the file -# - ensure Present/Absent or destination to a file to include another file -# - mode Mode for the file -# - owner Owner of the file -# - group Owner of the file -# - backup Controls the filebucketing behavior of the final file and -# see File type reference for its use. Defaults to 'puppet' -define concat::fragment($target, $content='', $source='', $order=10, $ensure = "present", $mode = 0644, $owner = root, $group = root, $backup = "puppet") { - $safe_name = regsubst($name, '/', '_', 'G') - $safe_target_name = regsubst($target, '/', '_', 'G') - $concatdir = $concat::setup::concatdir - $fragdir = "${concatdir}/${safe_target_name}" - - # if content is passed, use that, else if source is passed use that - # if neither passed, but $ensure is in symlink form, make a symlink - case $content { - "": { - case $source { - "": { - case $ensure { - "", "absent", "present", "file", "directory": { - crit("No content, source or symlink specified") - } - } - } - default: { File{ source => $source } } - } - } - default: { File{ content => $content } } - } - - file{"${fragdir}/fragments/${order}_${safe_name}": - mode => $mode, - owner => $owner, - group => $group, - ensure => $ensure, - backup => $backup, - alias => "concat_fragment_${name}", - notify => Exec["concat_${target}"] - } -} - -# vi:tabstop=4:expandtab:ai |