title: Capistrano 3: Get server info from role
body: <p>Is it possible to access the <code>hostname</code> and <code>user</code> of a role without using <code>on</code>, so I don't have to nest the task below so ugly?</p>
  
  <pre><code>task :foo do
      on roles(:web) do |host|
          run_locally do
              execute :rsync, '-avzr', "/foobar", "#{host.user}@#{host.hostname}:/foobar"
          end
      end
  end
  </code></pre>