Such that the module branch that is checked out is the same as the environment for which it is checked out. Obviouslt ${environment} isn't the right syntax and isn't a real variable name.

So the best answer to this question would be how to get a variable of the environment and the second best answer would be how to reference a variable (and what variables are available) in the Puppetfile.

1 Answer
1

Of course, 10 minutes after I ask the question, I figured out the answer (been trying to solve this for hours)...

In the Puppetfile you have access to the variables of the DSL class (see DLS class in GitHub. Thus you have access to @librarian which is an instance of the Puppetfile class (see puppetfile.rb). And from there, you have access to its attributes.

So the answer to getting a branch of the name of the current environment is: