diff --git a/lib/facter/concat_basedir.rb b/lib/facter/concat_basedir.rb new file mode 100644 index 0000000..02e9c5b --- /dev/null +++ b/lib/facter/concat_basedir.rb @@ -0,0 +1,5 @@ +Facter.add("concat_basedir") do + setcode do + File.join(Puppet[:vardir],"concat") + end +end diff --git a/manifests/setup.pp b/manifests/setup.pp index fa8c7eb..5b3ad26 100644 --- a/manifests/setup.pp +++ b/manifests/setup.pp @@ -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":