title: Ansible delegate_to how to set user that is used to connect to target?
body: <p>I have an Ansible (2.1.1.) inventory:</p>
  
  <pre><code>build_machine ansible_host=localhost ansible_connection=local
  staging_machine ansible_host=my.staging.host ansible_user=stager
  </code></pre>
  
  <p>I'm using SSH without <code>ControlMaster</code>. </p>
  
  <p>I have a playbook that has a synchronize command:</p>
  
  <pre><code>- name: Copy build to staging
    hosts: staging_machine
    tasks:
      - synchronize: src=... dest=...
        delegate_to: staging_machine
        remote_user: stager
  </code></pre>
  
  <p>The command prompts for password of the wrong user:</p>
  
  <p><code>local-mac-user@my-staging-host's password:</code></p>
  
  <p>So instead of using <code>ansible_user</code> defined in the inventory or <code>remote_user</code> defined in task to connect to target (hosts specified in play), it uses the user that we connected to <code>delegate-to</code> box as, to connect to target hosts.</p>
  
  <p>What am I doing wrong? How do I fix this?</p>
  
  <p>EDIT: It works in 2.0.2, doesn't work in 2.1.x</p>