Ultimately, Capistrano is a utility that can execute commands in parallel on multiple servers. It allows you to define tasks, which can include commands that are executed on the servers. You can also define roles for your servers, and then specify that certain tasks apply only to certain roles.
Capistrano is very configurable. The default configuration includes a set of basic tasks applicable to web deployment. (More on these tasks will be said later.)
Capistrano can do just about anything you can write shell script for. You just run those snippets of shell script on remote servers, possibly interacting with them based on their output. You can also upload files, and Capistrano includes some basic templating to allow you to dynamically create and deploy things like maintenance screens, configuration files, shell scripts, and more.
for F in $FILES do f=`basename $CP$F` scp $CP$F f1:~/ COMMAND="for s in b1 b2 b3 b5; do echo \$s; scp $f \$s:~/; ssh \$s \"sudo mv $f /$ZPATH/$F\"; done" ssh f1 $COMMAND done
Только в суде призходится timestamp_timeout большой выставлять, по ключу суда не авторизует сволочь.