Permalink
Browse files

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.
  • Loading branch information...
1 parent cfda8dd commit 45dfa6984cb185afc85c183152fbc6c2837e1345 @duritong duritong committed Jun 23, 2011
Showing with 6 additions and 1 deletion.
  1. +5 −0 lib/facter/concat_basedir.rb
  2. +1 −1 manifests/setup.pp
@@ -0,0 +1,5 @@
+Facter.add("concat_basedir") do
+ setcode do
+ File.join(Puppet[:vardir],"concat")
+ end
+end
View
@@ -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":

0 comments on commit 45dfa69

Please sign in to comment.