capistrano/capistrano — pull request #796 by andytinycat (2013-11-20 14:46:01+00:00)
Title: Add a command line option to control role filtering

The functionality to filter the executing tasks by role (i.e. deploying
only to servers that match the role you specify) already exists. It can
specified either by using the following in your deployment config:

set :filter, :roles => %w{app web}

Or by setting `ENV['ROLES']`:

ROLES=app,web cap production deploy

This commit adds a command line switch to set the role filter, which
avoids polluting ENV:

cap --roles=app,web production deploy