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:
parent
cfda8dd6ac
commit
45dfa6984c
2 changed files with 6 additions and 1 deletions
5
lib/facter/concat_basedir.rb
Normal file
5
lib/facter/concat_basedir.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
Facter.add("concat_basedir") do
|
||||
setcode do
|
||||
File.join(Puppet[:vardir],"concat")
|
||||
end
|
||||
end
|
|
@ -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":
|
||||
|
|
Loading…
Reference in a new issue