I am new to Ansible. I installed Anasible 2.2.1.0 and start to learn playbook.
Anyway now I am having a issue to copy a directory to the target host. I tried “copy” and “synchronize” without success.
Here is the playbook:
`
I am new to Ansible. I installed Anasible 2.2.1.0 and start to learn playbook.
Anyway now I am having a issue to copy a directory to the target host. I tried “copy” and “synchronize” without success.
Here is the playbook:
`
Looking at the command being run
cmd": “/usr/bin/rsync --delay-updates -F --compress --links --rsh ‘ssh -S none -o StrictHostKeyChecking=no’ --rsync-path="sudo rsync" --out-format=‘<>%i %n%L’ "/etc/ansible/files/ParaView-5.3.0-Qt5-OpenGL2-MPI-Linux-64bit/lib/" "sysadmin@192.168.123.150:/usr/local/lib/"”,
and the error message
“msg”: “sudo: no tty present and no askpass program specified\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]\n”,
It looks like you are a/ trying to use ‘sudo’ and b/ that sudo isn’t getting a password.
I’m guessing that you haven’t met all the conditions for using ‘become’ yet.
Have a read of http://docs.ansible.com/ansible/become.html
You might just need to specify the user you want to sudo as and the password for the sudo user.
Hope this helps,
Jon