Hi Christopher, As is clearly documented the filter has to be set before the tasks is loaded - http://capistranorb.com/documentation/advanced-features/host-filtering/#in-configuration there you will see other methods for achieving the same.
If you commonly do something like this, I suggest adding a Rakefile with some common shortcuts. Lee Hambley http://lee.hambley.name/ +49 (0) 170 298 5667 On 27 August 2015 at 21:09, Christopher J. Bottaro <[email protected]> wrote: > The deploy task doesn't appear to do any filtering, so when I deploy, > Capistrano tries to deploy application code to my load balancers. > > I tried doing something like this: > > before "deploy", "do_filter" do > set :filter, role: %w[app work] > end > > But it still deploys code to my servers tagged with the "web" role. > > I know that I can do this: > > ROLES=app,work cap production deploy > > But that is a pain. > > It seems very reasonable to put in the configuration the idea of "all > tasks within the deploy namespace should affect servers with [these] > roles". In fact, most Capistrano plugins do something like this; they give > you a variable to set which restricts tasks to a certain role or roles. > > Why doesn't the out of the box "deploy" namespace do something like this? > > Thanks, > -- C > > -- > You received this message because you are subscribed to the Google Groups > "Capistrano" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/capistrano/da44cc56-0bd8-43e0-80d8-e1021d9d7ad3%40googlegroups.com > <https://groups.google.com/d/msgid/capistrano/da44cc56-0bd8-43e0-80d8-e1021d9d7ad3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CAN_%2BVLUXp%3D%3D0909btB7yhQR2W%3D_jQDdwhyAMhgPzy4J329WO6g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
