In a playbook, I copy files using sudo. It worked ... Until we moved to Ansible 1.9 ... Since then, it does not work with the following error message:
"ssh connection closed waiting for sudo password request"
I provide the passwords ssh and sudo (via the Ansible prompt), and all other commands executed through sudo are successful (only a copy of the file and the template failed).
My team:
ansible-playbook -k -ask-get-pass -limit = testhost -C -D playbooks / debug.yml
and playbookd contains:
- hosts: designsync
gather_facts: yes
tasks:
- name: Make sure the syncmgr home folder exists
action: file path=/home/syncmgr owner=syncmgr group=syncmgr mode=0755 state=directory
sudo: yes
sudo_user: syncmgr
- name: Copy .cshrc file
action: copy src=roles/designsync/files/syncmgr.cshrc dest=/home/syncmgr/.cshrc owner=syncmgr group=syncmgr mode=0755
sudo: yes
sudo_user: syncmgr
Is this a mistake or am I missing something?
FranΓ§ois.
source
share