Can capistrano v3 specify HOSTS in command line like v2 does?

天涯浪子 提交于 2019-12-10 19:09:51

问题


In Capistrano v2, I can run deploy on the server specified in the command-line.

cap staging HOSTS="host1,host2" deploy

How can I do the same thing in the Capistrano v3?

example scenario

I have to scale my app, but I don't want to deploy all of my app servers. So I just want to run deploy on the new one.


回答1:


Not sure if you found this or not but the documentation says you can just list it in the command line like this:

cap --hosts=server1,server2 production deploy

See documentation here: Host Filtering Docs

See code here: Code Filtering Link

Looking at the code, it appears to be able to accepts HOSTS also.

See test confirming this: Test Confirming Both Options



来源:https://stackoverflow.com/questions/20783552/can-capistrano-v3-specify-hosts-in-command-line-like-v2-does

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!