Reputation: 15571
I am using the following command to get list of nodes in a particular environment.
knife node list -e env1
How can I modify knife command to also include the run list items within it?
Upvotes: 0
Views: 4856
Reputation: 174
This will get you half way, all nodes with their run list. You can also filter with the "environment/env" attribute
knife search node "*" -a run_list
Upvotes: 0
Reputation: 54181
You wouldn't use knife node list
for this. Most knife commands are very direct wrappers for their underlying REST API calls. If you want to build a script for displaying in a particular format, you probably want to use knife exec
or skip knife entirely and use something like the chef-api
gem or PyChef
Python library.
Upvotes: 2