Re: [Puppet Users] variable scoping and templates

2014-04-30 Thread jcbollinger
On Wednesday, April 30, 2014 2:43:07 PM UTC-5, Matthew Burgess wrote: > > We just ran into this too recently. From my investigation it looks like > the syntax you quote above is for referencing Hiera values in Puppet > manifests. > Nope, absolutely not. Templates have visibility into hiera on

Re: [Puppet Users] variable scoping and templates

2014-04-30 Thread Matthew Burgess
We just ran into this too recently. From my investigation it looks like the syntax you quote above is for referencing Hiera values in Puppet manifests. For erb templates we ended up using scope.function_hiera () although I wonder now whether a scope.lookupvar () call would a) be better and b) be be

[Puppet Users] variable scoping and templates

2014-04-30 Thread drs
I am new to puppet and am trying to figure out variable scoping. I have a test module that I am using for this and it looks like this: manifiests/init.pp: class test { include test::params file { 'testfile' : path => "/tmp/testfile", content => template("test/testfile.erb"), } }