> Hello list.
>
> I'm trying to use PuppetDB to link a webserver cluster to an EJB cluster.
> Each webserver host need to reference a comma separated list of IPs provided
> by each EJB host
>
> Exporting and collecting resources works pretty nice but I think this isn't
> the better approach. I just need a variable with a hash or an array to
> iterate within an ERB template in order to build my list.
>
> I tried the generate() function approach, using curl to request a JSON
> array. Iterating such array I can populate my template. But this approach
> sounds more a workaround instead a solution.
>
> Do you have another ideas to this scenario?
>
> Thanks, JM

Joao,

Take a look at this library, authored by my friend Eric:

https://github.com/dalen/puppet-puppetdbquery

It provides Puppet functions for querying PDB, its syntax is a wrapper
around our own PDB one, but should provide you with the tools to do
queries against PDB in a more arbitrary way hopefully avoiding the
need for your own curl/shell methodology. You might still need to
manipulate the data you receive using other tools, but it should be a
good start for what you want. If you get stuck further down the line,
respond to this thread.

We have plans to solidify this story, and make it closer to our core
offerings but I'm wary to get into a vapourware discussion until we
have something to show. For now, what I've provided is where you want
to look.

ken.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAE4bNTkmEHdTw%2BdR7myJYJcAt%2B3ukkfimW8V%2BRKmdJOkWvQbdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to