don't use a hardcoded concatdir

Get the concat base directory from a fact -> makes it useable if
Puppet's :vardir is not /var/lib/puppet/. This fixes problems with
PE and makes the module also useable for puppet runs as
unpriviledged user.
This commit is contained in:
Peter Meier 2011-06-23 11:05:43 +02:00
parent cfda8dd6ac
commit 45dfa6984c
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
Facter.add("concat_basedir") do
setcode do
File.join(Puppet[:vardir],"concat")
end
end

View file

@ -14,7 +14,7 @@
# It also copies out the concatfragments.sh file to /usr/local/bin
class concat::setup {
$root_group = 0
$concatdir = "/var/lib/puppet/concat"
$concatdir = $concat_basedir
$majorversion = regsubst($puppetversion, '^[0-9]+[.]([0-9]+)[.][0-9]+$', '\1')
file{"/usr/local/bin/concatfragments.sh":