after upgrading to ansible 2.0 i am getting an error when trying to synchronize a directory to a remote server. Ansible version: 2.0.0.2
The entire playbook runs with sudo:yes, but the error only happens on the synchronize module. does anyone have have an idea or places to look to resolve my issue?
I switched from synchronize to copy and everything works, but obviously very slow.
The issue is that the synchronize task tries to escalate to root on the tower machine, not on the target host. Since awx user doesnt have sudo permissions, it fails.
to fix this, set sudo to “no” on the task and specify the rsync_path as “sudo rsync”. This will ensure it doesnt sudo on the tower machine.
name: copy source to host directory
synchronize: src=…/…/…/src/ dest=/var/www/aaa-newsletter-builder times=no perms=no group=no rsync_path=“sudo rsync”
sudo: no