cap shell

Capistrano shell runs ad-hoc tasks on multiple servers

I wanted to check the time on three servers. It was simple to run ‘date’ on all three hosts simultaneously using ‘cap shell’, a feature Jamis implemented our of curiosity one afternoon.

$ cap shell HOSTS=hardy,lucid,natty
    triggering load callbacks
  * executing `deprec:connect_canonical_tasks'
  * executing `shell'
Welcome to the interactive Capistrano shell! This is an experimental
feature, and is liable to change in future releases. Type 'help' for
a summary of how to use the shell.
cap> date
[establishing connection(s) to hardy, lucid, natty]
 ** [out :: hardy] Sat May 28 02:44:47 EST 2011
 ** [out :: lucid] Sat May 28 02:44:48 EST 2011
 ** [out :: natty] Sat May  7 01:07:55 EST 2011

Looks like natty is a bit out. I’ll have to check that.


Leave a Reply