Hi,

Unfortunately this is expected to behave differently for everyone, host or role 
filters should be additive, or subtractive; there is no "correct behaviour"

I encourage you to engineer your recipes to use servers_for_role() when you 
need to bypass filters that filter out too much, and to avoid engineering your 
recipes to rely on host/role specific configuration.

> 1. remove the target server from my nginx upstream

Configuration file management is better served with Chef, Puppet, BOSH or 
similar [1].  

If steps 1&3 were about making a "Deployment in progress" page, You can do that 
with try_files (NGinx directive), and upload a maintenance message, removing it 
when you are done, `cap web:disable` does this (and might be removed, depending 
which version you are using)

--
[1] 
http://en.wikipedia.org/wiki/Comparison_of_open_source_configuration_management_software



On Tuesday, May 22, 2012 at 9:52 AM, 赵 耀 wrote:

> Hi everyone,
>  
> When I tried to do this:
> 1. remove the target server from my nginx upstream  
> 2. reload nginx
> 3. restart my app server #
> 4. add back to nginx upstream
> 5. reload nginx.
>  
> Because I declared a ROLES or HOSTS env, all commands are running at the app 
> server. The env hide the :roles => :nginx I passed into the `run` `download` 
> methods.
> For some reasons I can not declare :roles => on the task, which means I must 
> use the env vars to declare which host I want to deploy.
> How can do this?
>  
>  
>  
> Best regards.
>  
> --  
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to [email protected] 
> (mailto:[email protected])
> * To unsubscribe from this group, send email to 
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/capistrano?hl=en
>  
>  


-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to