Topic: Capistrano: How to use sudo with recipes?

I need to be able to run some standard tasks with sudo.  (E.g. my account name is george and george has password-less sudo access to the 'web' account to deploy files and such.)

As a test, I have successfully written some custom tasks like:

run "#{sudo :as => "web"} whoami"

But I want to have several *existing* recipes run under sudo also, and I can't figure out whether cap supports this or not, and if so what the syntax is. I can't just re-write all our tasks to use sudo. For example, how would I run an existing task called deploy:symlink ?

I've tried:

set :user, "george"
set :use_sudo, true
set :sudo_user, "web"  

I figured this would force *all* my tasks to run with sudo, but this seems to not work, when I try it my tasks run as user george.

(Running Capistrano 2.5.19)

Re: Capistrano: How to use sudo with recipes?

For those that also have this problem: Turns out there appears to be a bug in my version of Capistrano.  I rolled back to a prior version and things work now.