Russel, I can see the hash on puppet master but not on agent. Can this be the reason ? Importantly, when I try to create a file for custom facts on agent, it gets deleted in the subsequent puppet run.
SERVER # facter --puppet box32.interfaces_ipv4.eth0.bootproto static # AGENT # facter --puppet box32.interfaces_ipv4.eth0.bootproto # -Vikas On Monday, 12 October 2015 13:12:16 UTC+11, Russell Miller wrote: > > > 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/f69988ed-3088-4530-978e-99c12eb6591a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.