Open deniskin82 opened 6 years ago
@deniskin82 This is something we've been thinking about. In the earliest prototypes we had a file based inventory and scratched it from the first first release because we want to take a more wholistic approach to inventory support. When we do that I think being able to use chef server as a source of targets is part of the picture.
Moved/combined into https://github.com/chef/chef-apply/issues/41
This is a feature request(todo) and something to think about. Would be great to get a list of target nodes(names to display and IPs for connection with
-a ipaddress
) from chef-server by using a query, similar toknife ssh QUERY COMMAND (options)
Examples:
chef-run -t 'roles:www AND chef_environment:dev' -a ipaddress package ntp action=install
chef-run -t 'roles:www AND chef_environment:dev' -a ipaddress service httpd action=restart
orchef-run 'Q@roles:www AND chef_environment:dev' -a ipaddress service httpd action=restart