title: Ansible synchronize asking for a password
body: <p>I am using Ansible (1.9.2) to deploy some files to a Redhat 6.4 server.</p>
  
  <p>The playbook looks something like this</p>
  
  <pre><code>- name: deploy files
    hosts: web
    tasks:
      - name sync files
        sudo: no
        synchronize:
          src={{ local_path }}
          dest={{ dest_path }}
  </code></pre>
  
  <p>And to kick this off I run something like the following</p>
  
  <pre><code>ansible-playbook -i myinventory myplaybook.yml -u DOMAIN\\user --ask-pass
  </code></pre>
  
  <p>When I start the play I enter my password at the prompt, facts are then obtained successfully, however as soon as the <em>synchronize</em> task is reached another prompt asks for my password again, like the following</p>
  
  <pre><code>DOMAIN\user@hostname's password:
  </code></pre>
  
  <p>If I enter my password again the deploy completes correctly.</p>
  
  <p><strong>My questions are</strong></p>
  
  <ol>
  <li>How can I fix or work around this, so that I do not have to enter my password for every use of the synchronize module?</li>
  <li>Is this currently expected behaviour for the synchronize module? Or is this a bug in Ansible?</li>
  </ol>
  
  <p>I cannot use ssh keys due to environment restrictions.</p>
  
  <p>I do not want to use the copy module for scalability reasons.</p>
  
  <p><strong>Things I have tried</strong></p>
  
  <ol>
  <li>I have seen a number of other questions on this subject but I have
  not been able to use any of them to fix my issue or understand if
  this is expected behavior.
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/24763343/ansible-synchronize-prompts-passphrase-even-if-already-entered-at-the-beginning">Ansible synchronize prompts passphrase even if already entered at the beginning</a></li>
  <li><a href="https://stackoverflow.com/questions/24504430/ansible-prompts-password-when-using-synchronize">Ansible prompts password when using synchronize</a></li>
  <li><a href="https://github.com/ansible/ansible/issues/5934" rel="noreferrer">https://github.com/ansible/ansible/issues/5934</a></li>
  <li><a href="https://github.com/ansible/ansible/issues/7071" rel="noreferrer">https://github.com/ansible/ansible/issues/7071</a></li>
  </ul></li>
  <li>The Ansible docs are generally excellent but I have not been able to find anything about this on the offical docs.</li>
  <li>I have tried specifiying the user and password in the inventory file and not using the <em>--ask-pass</em> and <em>-u</em> parameters. But while I then do not have to enter the password to collect facts, the synchronize module still requests my password.</li>
  <li>I have tried setting the <em>--ask-sudo-pass</em> as well, but it did not help</li>
  <li>I have been using a CentOS 7 control box, but I have also tried an Ubuntu 14.04 box</li>
  </ol>
  
  <p>Can anyone help?</p>