I am using Ansible (1.9.2) to deploy some files on a Redhat 6.4 server.
The playlist looks something like this:
- name: deploy files hosts: web tasks: - name sync files sudo: no synchronize: src={{ local_path }} dest={{ dest_path }}
And to drop that, I run something like the following
ansible-playbook -i myinventory myplaybook.yml -u DOMAIN\\user --ask-pass
When I start the game, I enter my password in the invitation, after which the results will be received successfully, however, as soon as the synchronization task is reached, another invitation again asks for my password, for example the following
DOMAIN\ user@hostname password:
If I enter my password again, the deployment will complete correctly.
My questions
- How can I fix or work around this so that I donβt need to enter a password for each use of the synchronization module?
- Is this the expected behavior for a sync module? Or is it an error in Ansible?
I cannot use ssh keys due to environmental restrictions.
I do not want to use the copy module for scalability reasons.
Things i tried
- I saw a number of other questions on this, but I have not been able to use any of them to fix my problem or to understand if this is the expected behavior.
- Ansible docs are generally excellent, but I could not find anything about this in the official docs.
- I tried to specify the user and password in the inventory file and not use the -ask-pass and -u options. But while I donβt need to enter a password for collecting facts, the synchronization module still asks for my password.
- I also tried setting -ask-sudo-pass, but that didn't help
- I use the CentOS 7 control unit, but I also tried the Ubuntu 14.04 box
Can anyone help?
source share