Try: notice($t['given'])
Or: notice("${t['given']}") Surrounding the var in ${} within quotes helps the parser/interpolation find the edges of your var declaration. ken. On Thu, Aug 4, 2011 at 2:09 AM, Douglas Garstang <doug.garst...@gmail.com> wrote: > Well, this is weird... > If I have this yaml file: > --- > customer: > given: Dorothy > family: Gale > and this puppet code: > $t = extlookup("customer", '---', 'settings') > notice("$t['given']") > then the value displayed is: > givenDorothyfamilyGale['given'] > which is pretty crappy. However, if I put the same thing in a template: > <%= t['given'] %> > and when the template runs, I get 'Dorothy', which is correct. So... what > should I be doing here? Should I just load up the entire thing into puppet > and use ruby magic inside templates to get the values I need? Why can't > puppet even print these values out? How do I access them in the puppet? The > language guide says I can do this... > Doug. > > On Wed, Aug 3, 2011 at 6:00 PM, Douglas Garstang <doug.garst...@gmail.com> > wrote: >> >> No luck with that either. >> >> On Wed, Aug 3, 2011 at 5:51 PM, Aaron Grewell <aaron.grew...@gmail.com> >> wrote: >>> >>> No, pull the whole hash and break it down afterwards. >>> >>> On Aug 3, 2011 5:15 PM, "Douglas Garstang" <doug.garst...@gmail.com> >>> wrote: >>> > Aaron, >>> > >>> > I'm not sure you understood my question. I was asking how I could do >>> > that >>> > with extlookup. Your saying that this should work? >>> > >>> > $test_var = extlookup('testkey1[testkey2]', '---', 'settings') >>> > >>> > Doug. >>> > >>> > On Wed, Aug 3, 2011 at 4:53 PM, Aaron Grewell >>> > <aaron.grew...@gmail.com>wrote: >>> > >>> >> variable[key][subkey][subsubkey] >>> >> >>> >> You've really got to read the language guide, it explains the use of >>> >> arrays >>> >> and hashes pretty well: >>> >> http://docs.puppetlabs.com/guides/language_guide.html >>> >> >>> >> >>> >> On Wed, Aug 3, 2011 at 4:49 PM, Douglas Garstang >>> >> <doug.garst...@gmail.com>wrote: >>> >> >>> >>> Ah.... that makes sense.... so.... i'll give that a try.... but ... >>> >>> how do >>> >>> I access a key that's deep down in the data structure? Not possible? >>> >>> >>> >>> On Wed, Aug 3, 2011 at 4:46 PM, Aaron Grewell >>> >>> <aaron.grew...@gmail.com>wrote: >>> >>> >>> >>>> Yes. You're probably being confused by Puppet's default behavior, >>> >>>> which >>> >>>> is to concatenate arrays & hashes together into a string >>> >>>> representation when >>> >>>> you're printing it. >>> >>>> >>> >>>> >>> >>>> On Wed, Aug 3, 2011 at 4:34 PM, Douglas Garstang < >>> >>>> doug.garst...@gmail.com> wrote: >>> >>>> >>> >>>>> So, I'll ask this question... >>> >>>>> >>> >>>>> With hiera, can you retrieve complex multi level YAML data at any >>> >>>>> level >>> >>>>> and return it in it's base format, as a string, array etc? If not, >>> >>>>> it's no >>> >>>>> better than csv. >>> >>>>> >>> >>>>> Doug. >>> >>>>> >>> >>>>> On Wed, Aug 3, 2011 at 4:30 PM, Scott Smith <sc...@ohlol.net> >>> >>>>> wrote: >>> >>>>> >>> >>>>>> Check the example directory, probably what you're looking for >>> >>>>>> >>> >>>>>> https://github.com/ripienaar/hiera-puppet/tree/master/example >>> >>>>>> >>> >>>>>> On Wed, Aug 3, 2011 at 4:26 PM, Douglas Garstang < >>> >>>>>> doug.garst...@gmail.com> wrote: >>> >>>>>> >>> >>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith <sc...@ohlol.net> >>> >>>>>>> wrote: >>> >>>>>>> >>> >>>>>>>> https://github.com/ripienaar/hiera-puppet >>> >>>>>>>> >>> >>>>>>>> Check the "Puppet" section in the heira README >>> >>>>>>>> >>> >>>>>>>> >>> >>>>>>>> >>> >>>>>>>> >>> >>>>>>> Are you referring to this? >>> >>>>>>> >>> >>>>>>> 'It also includes a Puppet function that works like extlookup() >>> >>>>>>> but >>> >>>>>>> uses the Hiera backends.'. >>> >>>>>>> >>> >>>>>>> I _may_ need a little more than that to get going... >>> >>>>>>> >>> >>>>>>> Doug. >>> >>>>>>> >>> >>>>>>> -- >>> >>>>>>> You received this message because you are subscribed to the >>> >>>>>>> Google >>> >>>>>>> Groups "Puppet Users" group. >>> >>>>>>> To post to this group, send email to >>> >>>>>>> puppet-users@googlegroups.com. >>> >>>>>>> To unsubscribe from this group, send email to >>> >>>>>>> puppet-users+unsubscr...@googlegroups.com. >>> >>>>>>> For more options, visit this group at >>> >>>>>>> http://groups.google.com/group/puppet-users?hl=en. >>> >>>>>>> >>> >>>>>> >>> >>>>>> -- >>> >>>>>> You received this message because you are subscribed to the Google >>> >>>>>> Groups "Puppet Users" group. >>> >>>>>> To post to this group, send email to >>> >>>>>> puppet-users@googlegroups.com. >>> >>>>>> To unsubscribe from this group, send email to >>> >>>>>> puppet-users+unsubscr...@googlegroups.com. >>> >>>>>> For more options, visit this group at >>> >>>>>> http://groups.google.com/group/puppet-users?hl=en. >>> >>>>>> >>> >>>>> >>> >>>>> >>> >>>>> >>> >>>>> -- >>> >>>>> Regards, >>> >>>>> >>> >>>>> Douglas Garstang >>> >>>>> http://www.linkedin.com/in/garstang >>> >>>>> Email: doug.garst...@gmail.com >>> >>>>> Cell: +1-805-340-5627 >>> >>>>> >>> >>>>> -- >>> >>>>> You received this message because you are subscribed to the Google >>> >>>>> Groups "Puppet Users" group. >>> >>>>> To post to this group, send email to puppet-users@googlegroups.com. >>> >>>>> To unsubscribe from this group, send email to >>> >>>>> puppet-users+unsubscr...@googlegroups.com. >>> >>>>> For more options, visit this group at >>> >>>>> http://groups.google.com/group/puppet-users?hl=en. >>> >>>>> >>> >>>> >>> >>>> -- >>> >>>> You received this message because you are subscribed to the Google >>> >>>> Groups >>> >>>> "Puppet Users" group. >>> >>>> To post to this group, send email to puppet-users@googlegroups.com. >>> >>>> To unsubscribe from this group, send email to >>> >>>> puppet-users+unsubscr...@googlegroups.com. >>> >>>> For more options, visit this group at >>> >>>> http://groups.google.com/group/puppet-users?hl=en. >>> >>>> >>> >>> >>> >>> >>> >>> >>> >>> -- >>> >>> Regards, >>> >>> >>> >>> Douglas Garstang >>> >>> http://www.linkedin.com/in/garstang >>> >>> Email: doug.garst...@gmail.com >>> >>> Cell: +1-805-340-5627 >>> >>> >>> >>> -- >>> >>> You received this message because you are subscribed to the Google >>> >>> Groups >>> >>> "Puppet Users" group. >>> >>> To post to this group, send email to puppet-users@googlegroups.com. >>> >>> To unsubscribe from this group, send email to >>> >>> puppet-users+unsubscr...@googlegroups.com. >>> >>> For more options, visit this group at >>> >>> http://groups.google.com/group/puppet-users?hl=en. >>> >>> >>> >> >>> >> -- >>> >> You received this message because you are subscribed to the Google >>> >> Groups >>> >> "Puppet Users" group. >>> >> To post to this group, send email to puppet-users@googlegroups.com. >>> >> To unsubscribe from this group, send email to >>> >> puppet-users+unsubscr...@googlegroups.com. >>> >> For more options, visit this group at >>> >> http://groups.google.com/group/puppet-users?hl=en. >>> >> >>> > >>> > >>> > >>> > -- >>> > Regards, >>> > >>> > Douglas Garstang >>> > http://www.linkedin.com/in/garstang >>> > Email: doug.garst...@gmail.com >>> > Cell: +1-805-340-5627 >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> > Groups "Puppet Users" group. >>> > To post to this group, send email to puppet-users@googlegroups.com. >>> > To unsubscribe from this group, send email to >>> > puppet-users+unsubscr...@googlegroups.com. >>> > For more options, visit this group at >>> > http://groups.google.com/group/puppet-users?hl=en. >>> > >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Puppet Users" group. >>> To post to this group, send email to puppet-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> puppet-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/puppet-users?hl=en. >> >> >> >> -- >> Regards, >> >> Douglas Garstang >> http://www.linkedin.com/in/garstang >> Email: doug.garst...@gmail.com >> Cell: +1-805-340-5627 >> > > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garst...@gmail.com > Cell: +1-805-340-5627 > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig" -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.