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 -- 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/1496237775.652693.994141456.1C1EE7B6%40webmail.messagingengine.com. For more options, visit https://groups.google.com/d/optout.
