How Can I Collect Information About All Nodes in All Orgs?

Sean Horn -

If you have a Chef Server 12.x version and would like to find out facts about all nodes in all orgs, you can do something like the following from the server itself.

You can retrieve all the orgs on the server with

    chef-server-ctl org list

You could iterate through the org list like this, replacing the SERVERNAME and iterating on the ORGNAMEs returned above

    knife search node '*:*' -a id -s https://SERVERNAME/organizations/ORGNAME -u pivotal -k /etc/opscode/pivotal.pem

knife search -a allows you to choose which search fields are returned from the search.

Have more questions? Submit a request

Comments

Powered by Zendesk