Example
knife ssh -x sysadmin.a -a ipaddress "chef_environment:stage" uptime
- always define the user with
-x
- always give the ssh attribute
-a ipaddress
for knife to rely on the ip attributes of the search query result - the actual search query goes along standard
knife search
syntax - remember quotes around constructed commands, in particular
sudo do_this
Posted by Andreas Wagner to Toolbox Cash on Go's deck (2015-06-17 12:18)