set :user, "deployer"
set :runner, user
and "deployer" in this case would have sudo privs. If you just want
to run a single command with sudo, you can go
sudo "command string", :as => "user"
and it will run the command as whomever is specified with ":as".
:use_sudo is set to true by default, so commands will automatically be
run with sudo if they need them...
:run_method will also in most cases default to :sudo, so... I really
don't know where your problem is coming from.
Any clarification as to your actual deploy error would be great.
as = fetch(:runner, "app")
via = fetch(:run_method, :sudo)
invoke_command(command, :via => via, :as => as)
The :run_method variable is set by default to check :use_sudo and return
:sudo if it is true, and :run otherwise.
- Jamis