I disagree. I specifically monkey patch cap to allow this behavior. In some stages I need a front end nginx loadbalancer and some cases I don't because I'm either using Zeus or an ELB. I can use Role targeting in my stage files by either including a nginx role or omit it, and a cap deploy will do the right thing in all three cases and all I had to do was manipulate the role assignments on the server objects.
Once you embrace the concept that roles can be empty it opens up a whole new level of flexibility for stage definition. I think it's an artificial constraint that has no pros. If you don't like empty roles don't define them. If you inadvertently don't populate a role you'll figure it out in short order without cap raising an exception. On Jul 31, 2012, at 1:40 AM, Lee Hambley <[email protected]> wrote: > The documentation is almost certainly wrong, there's been a lot of changes to > this code from various patches since the docs were written. Unfortunately > being in a Wiki we can't take documentation patches along with code patches > in the pull requests, and people often forget to update the docs once we mere > their pull request. Perhaps you'd like to update them to reflect the current > behavior? > > (I can't see a case for running a task with an empty list of servers for a > role, Capistrano is a tool for working on remote hosts, if you have a task > that doesn't have remote hosts, it's probably a rake task) > > Cheers, Lee > -- > * 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 -- * 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
