task :start_cold do
deploy.update
start_web_server
deploy.migrate
start_listeners
end
In this case, the :start_cold task itself applies to all servers
(because of the absense of a :roles or :hosts key). The deploy.update
call applies to all :app, :web, and :db servers. The start_web_server
would probably only apply to :web. deploy.migrate works only on :db
(:primary => true). And start_listeners would probably just run on :app.
That said, I can see the value in something like this:
task :do_something_on_server, :scope => :inherit do
# ...
end
Where the roles for the task inherit from the task that invoked it.
Maybe there's a cleaner way to do this, even. Anyone want to try their
hand a patch?
- Jamis