Unix administration stuff that was hard to find out using Google and caused a lot of try and error. Hereby given back to the net...
Chef: Which nodes have role X / recipe Y
Submitted by Lars Windolf on 22. October 2012 - 11:45.
Why is it so hard to find out which nodes have a given role or recipe in chef?
The only way seems to loop yourself:
for node in $(knife node list); do if knife node show -r $node | grep 'role\[base\]' >/dev/null; then echo $node; fi; done
Did I miss some other obvious way? I'd like to have some "knife run_list filter ..." command!