Anyone using? The docs are really bad. 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Looks pretty straight forward to me. What are you trying to do? On Wed, Aug 3, 2011 at 1:29 PM, Douglas Garstang <doug.garstang@gmail.com>wrote:> Anyone using? The docs are really bad. > > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Uhm, use it. I stopped for now as every time I tried to load a key on the command line I got errors, but I realised that there wasn''t even a puppet code example, just a ruby one. Is this even designed to be used inside puppet? Doug. On Wed, Aug 3, 2011 at 4:16 PM, Scott Smith <scott@ohlol.net> wrote:> Looks pretty straight forward to me. What are you trying to do? > > On Wed, Aug 3, 2011 at 1:29 PM, Douglas Garstang <doug.garstang@gmail.com>wrote: > >> Anyone using? The docs are really bad. >> >> 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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
https://github.com/ripienaar/hiera-puppet Check the "Puppet" section in the heira README On Wed, Aug 3, 2011 at 4:20 PM, Douglas Garstang <doug.garstang@gmail.com>wrote:> Uhm, use it. I stopped for now as every time I tried to load a key on the > command line I got errors, but I realised that there wasn''t even a puppet > code example, just a ruby one. Is this even designed to be used inside > puppet? > > Doug. > > On Wed, Aug 3, 2011 at 4:16 PM, Scott Smith <scott@ohlol.net> wrote: > >> Looks pretty straight forward to me. What are you trying to do? >> >> On Wed, Aug 3, 2011 at 1:29 PM, Douglas Garstang <doug.garstang@gmail.com >> > wrote: >> >>> Anyone using? The docs are really bad. >>> >>> 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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith <scott@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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.garstang@gmail.com>wrote:> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith <scott@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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 <scott@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.garstang@gmail.com>wrote: > >> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith <scott@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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.garstang@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 <scott@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.garstang@gmail.com >> > wrote: >> >>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith <scott@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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.grewell@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.garstang@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 <scott@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.garstang@gmail.com> wrote: >>> >>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith <scott@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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.garstang@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.grewell@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.garstang@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 <scott@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.garstang@gmail.com> wrote: >>>> >>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith <scott@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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.grewell@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.garstang@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.grewell@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.garstang@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
<scott@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.garstang@gmail.com> wrote:
>>>>>
>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith
<scott@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
No, pull the whole hash and break it down afterwards. On Aug 3, 2011 5:15 PM, "Douglas Garstang" <doug.garstang@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.grewell@gmail.com >wrote: > >> variable[key][subkey][subsubkey] >> >> You''ve really got to read the language guide, it explains the use ofarrays>> and hashes pretty well: >> http://docs.puppetlabs.com/guides/language_guide.html >> >> >> On Wed, Aug 3, 2011 at 4:49 PM, Douglas Garstang <doug.garstang@gmail.com >wrote: >> >>> Ah.... that makes sense.... so.... i''ll give that a try.... but ... howdo>>> 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.grewell@gmail.com >wrote: >>> >>>> Yes. You''re probably being confused by Puppet''s default behavior, which >>>> is to concatenate arrays & hashes together into a string representationwhen>>>> you''re printing it. >>>> >>>> >>>> On Wed, Aug 3, 2011 at 4:34 PM, Douglas Garstang < >>>> doug.garstang@gmail.com> wrote: >>>> >>>>> So, I''ll ask this question... >>>>> >>>>> With hiera, can you retrieve complex multi level YAML data at anylevel>>>>> 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 <scott@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.garstang@gmail.com> wrote: >>>>>> >>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith <scott@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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 GoogleGroups>>>> "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+unsubscribe@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.garstang@gmail.com >>> Cell: +1-805-340-5627 >>> >>> -- >>> You received this message because you are subscribed to the GoogleGroups>>> "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+unsubscribe@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+unsubscribe@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.garstang@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 topuppet-users+unsubscribe@googlegroups.com.> For more options, visit this group athttp://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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
No luck with that either. On Wed, Aug 3, 2011 at 5:51 PM, Aaron Grewell <aaron.grewell@gmail.com>wrote:> No, pull the whole hash and break it down afterwards. > On Aug 3, 2011 5:15 PM, "Douglas Garstang" <doug.garstang@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.grewell@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.garstang@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.grewell@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.garstang@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 <scott@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.garstang@gmail.com> wrote: > >>>>>> > >>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith <scott@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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.garstang@gmail.com>wrote:
> No luck with that either.
>
>
> On Wed, Aug 3, 2011 at 5:51 PM, Aaron Grewell
<aaron.grewell@gmail.com>wrote:
>
>> No, pull the whole hash and break it down afterwards.
>> On Aug 3, 2011 5:15 PM, "Douglas Garstang"
<doug.garstang@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.grewell@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.garstang@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.grewell@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.garstang@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
<scott@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.garstang@gmail.com> wrote:
>> >>>>>>
>> >>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott
Smith <scott@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@gmail.com
> Cell: +1-805-340-5627
>
>
--
Regards,
Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garstang@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+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Crap. Should be: notice($t[''given'']) I need a vacation... On Wed, Aug 3, 2011 at 6:09 PM, Douglas Garstang <doug.garstang@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.garstang@gmail.com>wrote: > >> No luck with that either. >> >> >> On Wed, Aug 3, 2011 at 5:51 PM, Aaron Grewell <aaron.grewell@gmail.com>wrote: >> >>> No, pull the whole hash and break it down afterwards. >>> On Aug 3, 2011 5:15 PM, "Douglas Garstang" <doug.garstang@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.grewell@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.garstang@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.grewell@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.garstang@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 <scott@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.garstang@gmail.com> wrote: >>> >>>>>> >>> >>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott Smith <scott@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@gmail.com >> Cell: +1-805-340-5627 >> >> > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garstang@gmail.com > Cell: +1-805-340-5627 > >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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.garstang@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.garstang@gmail.com>
> wrote:
>>
>> No luck with that either.
>>
>> On Wed, Aug 3, 2011 at 5:51 PM, Aaron Grewell
<aaron.grewell@gmail.com>
>> wrote:
>>>
>>> No, pull the whole hash and break it down afterwards.
>>>
>>> On Aug 3, 2011 5:15 PM, "Douglas Garstang"
<doug.garstang@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.grewell@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.garstang@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.grewell@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.garstang@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
<scott@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.garstang@gmail.com> wrote:
>>> >>>>>>
>>> >>>>>>> On Wed, Aug 3, 2011 at 4:22 PM, Scott
Smith <scott@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@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+unsubscribe@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+unsubscribe@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.garstang@gmail.com
>> Cell: +1-805-340-5627
>>
>
>
>
> --
> Regards,
>
> Douglas Garstang
> http://www.linkedin.com/in/garstang
> Email: doug.garstang@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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.