HouseTrip/guignol — pull request #1 by stevecreedon (2012-08-28 17:53:23+00:00)
Title: Feature execute ssh

I've made some changes to the Command::Base so that we have a list of servers then arguments as soon as the first '--named-arg' is found. For example

comm = SomeCommand.new("mysql3", "mysql4", "--execute", 'touch test.txt', "--aws-key" "~/.ssh/my-key.pem") will parse thus:

comm.servers will return ["mysql3", "mysql4"]
comm.args will return ["--execute", 'touch test.txt', "--aws-key" "~/.ssh/my-key.pem"]
comm.arg_val("--aws-key") will return "~/.ssh/my-key.pem"

I know there are existing libraries for parsing command line args but couldn't find one that did it quite like this.

Added the Execute command that calls execute on the named servers using the above --execute and --aws-key args. At the moment we have to use --aws-key as the Fog Compute AWS SSH class seems to always use the ubuntu user even if a username is set. Something to fix.