2013-05-09 21:24:22 +02:00
# = = = Class : concat: : setup
#
2013-10-23 19:34:44 +02:00
# Sets up the concat system. This is a private class .
2010-05-06 23:55:02 +02:00
#
2013-05-09 21:24:22 +02:00
# [ $c oncatdir]
# is where the fragments live and is set on the fact concat_basedir.
# Since puppet should always manage files in $c oncatdir and they should
# not be deleted ever, / tmp is not an option.
2010-05-06 23:55:02 +02:00
#
2011-12-14 22:45:06 +01:00
# It also copies out the concatfragments. sh file to $ {concatdir} / bin
2013-05-09 21:24:22 +02:00
#
2010-05-06 23:55:02 +02:00
class concat: : setup {
2013-10-23 19:34:44 +02:00
if $ca ller_module_name ! = $ module_name {
fail( "Use of private class ${name} by ${caller_module_name}" )
}
2012-05-23 23:35:08 +02:00
if $ : : concat_basedir {
$c oncatdir = $ : : concat_basedir
} else {
2013-10-22 17:53:18 +02:00
fail ( '$concat_basedir not defined. Try running again with pluginsync=true on the [master] and/or [main] section of your node\' s \ '/etc/puppet/puppet.conf\' . ' )
2012-05-23 23:35:08 +02:00
}
2013-10-24 00:42:44 +02:00
File {
backup = > false ,
}
2013-10-22 17:53:18 +02:00
file { "${concatdir} / bin/ concatfragments. sh" :
2012-03-14 18:02:43 +01:00
mode = > '0755' ,
2013-10-23 16:08:22 +02:00
source = > 'puppet:///modules/concat/concatfragments.sh' ,
2013-10-22 17:53:18 +02:00
}
2010-05-06 23:55:02 +02:00
2013-10-22 17:53:18 +02:00
file { [ $concatdir, "${concatdir} / bin" ] :
2012-03-14 18:02:43 +01:00
ensure = > directory,
2013-10-24 17:48:37 +02:00
mode = > '0755' ,
2013-10-22 17:53:18 +02:00
}
2010-05-06 23:55:02 +02:00
}