1 # Sets up the concat system.
3 # $concatdir is where the fragments live and is set on the fact concat_basedir.
4 # Since puppet should always manage files in $concatdir and they should
5 # not be deleted ever, /tmp is not an option.
7 # $puppetversion should be either 24 or 25 to enable a 24 compatible
8 # mode, in 24 mode you might see phantom notifies this is a side effect
9 # of the method we use to clear the fragments directory.
11 # The regular expression below will try to figure out your puppet version
12 # but this code will only work in 0.24.8 and newer.
14 # It also copies out the concatfragments.sh file to ${concatdir}/bin
22 if $::concat_basedir {
23 $concatdir = $::concat_basedir
25 fail ("\$concat_basedir not defined. Try running again with pluginsync=true on the [master] section of your node's '/etc/puppet/puppet.conf'.")
28 $majorversion = regsubst($::puppetversion, '^[0-9]+[.]([0-9]+)[.][0-9]+$', '\1')
29 $fragments_source = $majorversion ? {
30 24 => 'puppet:///concat/concatfragments.sh',
31 default => 'puppet:///modules/concat/concatfragments.sh'
34 file{"${concatdir}/bin/concatfragments.sh":
38 source => $fragments_source;
40 [ $concatdir, "${concatdir}/bin" ]:
46 ## Old versions of this module used a different path.
47 '/usr/local/bin/concatfragments.sh':