g10k
g10k copied to clipboard
variable interpolation in Puppetfile not working
Hi. I am using variables in my Puppetfile which work with r10k, but they don't seem to work with g10k.
Example from my Puppetfile:
PUPPETENVIRONMENT='test'
DEPOT="ssh://[email protected]/puppet"
mod 'company_firewall',
:git => "#{DEPOT}/company_firewall",
:ref => "#{PUPPETENVIRONMENT}"
by doing taht, my puppetfile was almost the same across branches. Only this line was changing: PUPPETENVIRONMENT='test'
Variable interpretation in a Puppetfile does indeed do not work and to be honest I did not know that r10k did provide that feature up until now.
I'll check it out if I can provide this for g10k
On Feb 18, 2017 14:05, "Massimiliano Adamo" [email protected] wrote:
Hi. I was using variables in my Puppetfile which work with r10k, but they don't seem to work with g10k.
Example from my Puppetfile: ` PUPPETENVIRONMENT='test' DEPOT="ssh://[email protected]/puppet"
mod 'company_firewall', :git => "#{DEPOT}/company_firewall", :ref => "#{PUPPETENVIRONMENT}" `
by doing taht, my puppetfile was almost the same across branches. Only this line was changing: PUPPETENVIRONMENT='test'
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xorpaul/g10k/issues/36, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5QTVtLQn3rA2MfTrpuV_kUND1fiir3ks5rdux-gaJpZM4MFHho .
probably not a hig priority request... I have created a small wrapper, that create the puppetfile, from a erb template.... I should probably switch to yaml at some point.
@xorpaul, r10k can do that because it evaluates the puppetfile as ruby code. I'm doing the same thing in puppetfiler.
I'd propose to execute the Puppetfile, if it is executable or Puppetfile.$extension, and acting on the output with g10k. Imho that would solve the problem elegantly and still be backwards compatible.
@ntnn it's what I have done here by creating a Puppetfile.j2: g10k-webhook
In that case Puppetfile is in .gitignore and it's generated on the fly.
And jinja was easier to use with python