So obvious now that I think about it! *slaps head*

Cheers
Josh

On Tuesday, September 25, 2012 3:11:32 AM UTC+1, Nan Liu wrote:
>
> On Mon, Sep 24, 2012 at 2:39 AM, Josh 
> <[email protected]<javascript:>> 
> wrote: 
> > I am using the latest version of hiera and puppet and wondering if there 
> is 
> > any way to make variables in hiera interpolate when they are called, for 
> > example: 
> > 
> > --- 
> > foo: 
> >   bar: $::hostname 
> >   baz: $some_variable 
> > 
> > When I try to access this in puppet it invariably comes back with 
> > '$hostname' instead of the variable, as if it has been single quoted by 
> > default. The same applies if I set a variable in the module as in the 
> second 
> > example. I tried double quoting the value to no effect. 
> > 
> > I know I can fix this by looking at each variable and processing it but 
> this 
> > seems clunky and becomes especially annoying when arrays are involved. 
> > 
> > Any way to get puppet to take notice of the $ and look the actual value 
> up? 
>
> In heira variable lookup is %{varname}, so in this case %{hostname}. 
>
> HTH, 
>
> Nan 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/YCtTucAZybUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to