> On 31 May 2017, at 16:05, Daniel Scott <[email protected]> wrote:
> 
>> On Wednesday, 31 May 2017 14:36:33 UTC+1, R.I. Pienaar wrote:
>> 
>> 
>> On Wed, May 31, 2017, at 15:33, Daniel Scott wrote: 
>> > Hi, 
>> > 
>> > I'm looking for a way to list all hosts known by a puppetserver (in 
>> > puppetdb). 
>> > 
>> > I've been using 'puppet cert list --all', however, this doesn't 
>> > necessarily 
>> > correspond to the list of hosts in puppetdb (for example, if I have to 
>> > rebuild the puppet server, and lose all the certs, but I still have the 
>> > database). 
>> > 
>> > Is there a 'puppet' command to list all known hosts? 
>> > 
>> > I know that it's possible by running a curl against the puppetdb server 
>> > itself, but it would be much cleaner if I could just run a command on the 
>> > puppetserver. 
>> 
>> Install the client tools: 
>> 
>>    https://docs.puppet.com/puppetdb/4.4/pdb_client_tools.html 
>> 
>> Use PQL to query it: 
>> 
>>    https://docs.puppet.com/puppetdb/4.4/api/query/examples-pql.html 
> 
> Hmm, thanks.
> 
> That's basically a wrapper around a curl, right?

Probably uses the language native http client but comes down to the same. 

It's cleaner though since you don't have to worry about all the right params 
and it has a configure etc


> 
>  
> -- 
> 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/6d6d748b-3190-447b-abd3-8296335bfa67%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/4A61E459-153D-467C-8169-2869B7761166%40devco.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to