Use Client vardir, not the puppet masters vardir #3

wants to merge 3 commits into


None yet
3 participants

wleese commented Mar 4, 2014

The function is meant to output the path on the client to the output file. If a client uses a different Puppet[:vardir] however, the code will fail by using the Puppet Masters Puppet[:vardir] - as expected of functions.

This change will use the stdlib puppet_vardir fact to retrieve the proper vardir value. In absence of the stdlib fact, it'll fall back to old behaviour.

wleese commented Mar 12, 2014

Anything I can do to get this merged?

@@ -15,6 +15,14 @@
module Puppet::Parser::Functions
newfunction(:concat_output, :type => :rvalue, :doc => "Returns the output file for a given concat build.") do |args|
- "#{Puppet[:vardir]}/concat/output/#{args.first}.out"
+ vardirfact = lookupvar('puppet_vardir')

domcleal Mar 12, 2014


Best to use ::puppet_vardir to explicitly mean the top level fact.


domcleal commented Mar 12, 2014

Sorry, I didn't notice this. 👍

wleese commented Mar 12, 2014

Using toplevel var now


ekohl commented Mar 13, 2014



domcleal commented Mar 13, 2014

Thanks @wleese, merged as 806f236.

@domcleal domcleal closed this Mar 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment