Is there way to run a command in capistrano without adding it to a Capfile?
example:
cap --eval "run 'du -sh'" --role web
You can use this to run a command on the servers.
cap ROLES=web invoke COMMAND='du -sh'
If you don't even have a cap recipe, you can specify the servers on the command-line:
cap -s user=myusername HOSTS=server1.com,server2.com invoke COMMAND='du -sh'
To see more command-line options, run cap -H
and cap -e invoke
.
You can use the (experimental) Capistrano shell.
$ cap shell
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With