I am using Ansible (1.9.2) to deploy some files to a Redhat 6.4 server.
The playbook looks something like this
- name: deploy files
hosts: web
tasks:
- name sync files
sudo: no
synchronize:
src={{ local_path }}
dest={{ dest_path }}
And to kick this off I run something like the following
ansible-playbook -i myinventory myplaybook.yml -u DOMAIN\\user --ask-pass
When I start the play I enter my password at the prompt, facts are then obtained successfully, however as soon as the synchronize task is reached another prompt asks for my password again, like the following
DOMAIN\user@hostname's password:
If I enter my password again the deploy completes correctly.
My questions are
- 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?
- Is this currently expected behaviour for the synchronize module? Or is this a bug in Ansible?
I cannot use ssh keys due to environment restrictions.
I do not want to use the copy module for scalability reasons.
Things I have tried
- 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.
- The Ansible docs are generally excellent but I have not been able to find anything about this on the offical docs.
- I have tried specifiying the user and password in the inventory file and not using the --ask-pass and -u parameters. But while I then do not have to enter the password to collect facts, the synchronize module still requests my password.
- I have tried setting the --ask-sudo-pass as well, but it did not help
- I have been using a CentOS 7 control box, but I have also tried an Ubuntu 14.04 box
Can anyone help?