On Mon, Sep 24, 2012 at 2:39 AM, Josh <[email protected]> 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 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.