On Sunday, October 11, 2015 at 7:06:11 PM UTC-7, Vikas Kumar wrote: > > Hi Russel, > > I tried to use reference the variable as below, but got an error. > Vikas, that means either it's not a hash or a requested hash element doesn't exist. I don't have a puppet instance in front of me so I'm not 100% sure of this, but iirc, hostname is a default fact that is a standard scalar variable. I'd check to see exactly what it's returning. If it's a fact you built yourself, then you might be dealing with a namespace conflict.
The important thing to note here: All ruby variables imported from puppet are preceded by "@" (I know of no exceptions though there may be) and the puppet scoping is also important. I'm very confident that once you know what your variable looks like, you'll be able to access it through a ruby template. --Russell -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/bacfa066-d0a5-44d5-a552-360b39e1d8af%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.