Fix capistrano v3 roles

Capistrano roles are broken in v3 support.

I'd like to take this PR a step further and reduce code duplication, but I want feedback first about whether you'd accept this solution before I start refactoring it.