Unfortunately puppet lookup doesn't work at all for me, instead it's 
complaining about being unable to load some ruby gems that are related to a 
windows chocolaty module that doesn't even get called in the current 
environment.  Mind you simple puppet agent -t runs and everything else is 
flawless ... but anything Hiera related has been an exercise in patience. 
 Only way I've been able to test it to make a custom role::hieratest and 
assign it to my server and just invoke puppet runs over and over to see how 
the lookup works.  There isn't even a module on the forge for formatting 
the global hiera.yaml on the puppet master (they all stop at v4).  Custom 
template for that ... Once I get this consul integration doing what I want 
I'll do everything in my power to avoid re-configuring hiera at all costs.  

Integrating Consul has been a very frustrating journey, much more so than I 
anticipated when I started.

Does anyone even have a list of example code I can borrow from?  I can find 
videos of peopel claiming it's awesome at puppet conf but they are all 
horrifically devoid of any real detail or usable example.  I can't imagine 
I'm the first person who's tried to lookup what services are registered to 
a node yet ... can't find a single working example.




On Thursday, August 31, 2017 at 5:47:09 PM UTC-7, John Baird wrote:
>
> Justin,
>
> Funny, i'm dealing with a somewhat similar scenario, but I should let you 
> know that you CAN run lookup from CLI...
>
> "puppet lookup" should invoke exactly what "lookup" does from within 
> puppet, that's actually something they did amazingly well...
>
> On Thursday, August 31, 2017 at 11:29:02 AM UTC-5, Justin DynamicD wrote:
>>
>> Appreciate your feedback.  After a bit of "mucking about" I've added a v5 
>> yaml to a branch and will probably merge it in soon, but have left the 
>> global yaml inplace as v3 until I can do more testing ...
>>
>> That said the lookup() feature doesn't feel any easier than the old hiera 
>> statement ... arguably harder actually.  hiera('var' , []) was easier to me 
>> than lookup('var', data, 'first', []) but meh, overtime maybe I'll 
>> appreciate it or at least accept it now that I can make per-environment 
>> hiera changes.
>>
>> Yes, the lookup seems to work like you said it would, but it seems I've 
>> only opened a can of worms:
>>
>> 1.  I can't run lookup from the cli, only hiera.  So guess I have to 
>> figure out why (maybe because the global hiera is still v3?)
>> 2.  the consul backend dumps an array of hashes ... eww ... looks like 
>> Ill have to get really clever about how to manipulate things to get the 
>> exact key/value I want ... out of scope of this question though.
>>
>> Thank you for your help.
>>
>

-- 
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/5a93ef3d-7be4-46cb-a52d-2d07bd41d73a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to