List all hosts

255 views
Skip to first unread message

Daniel Scott

unread,
May 31, 2017, 9:33:44 AM5/31/17
to Puppet Users
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.

Thanks,

Dan

R.I.Pienaar

unread,
May 31, 2017, 9:36:33 AM5/31/17
to puppet...@googlegroups.com

Daniel Scott

unread,
May 31, 2017, 10:05:12 AM5/31/17
to Puppet Users
Hmm, thanks.

That's basically a wrapper around a curl, right?

 

R.I. Pienaar

unread,
Jun 2, 2017, 3:24:18 AM6/2/17
to puppet...@googlegroups.com
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 puppet-users...@googlegroups.com.
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.
Reply all
Reply to author
Forward
0 new messages