That explains it then. With ansible.posix.synchronize
, one end is always the Ansible controller. As you’re designating mode: pull
, it’s trying to pull from user@sourceserver:/home/user/folder
to /home/user
on the Ansible controller (which, as it’s an execution environment, probably doesn’t exist anyway).
The terminology is often a bit loose. In this case, the synopsis says, “It is run and originates on the local host where Ansible is being run.” That describes the Ansible controller, but it doesn’t actually say “Ansible controller”. Efforts are underway to clarify in a consistent way such statements. And, to be fair, you have to really want to read it another way to get it wrong in this case. But, yeah.
That same synopsis also says, “You still may need to call rsync directly via command
or shell
depending on your use case.” So don’t feel bad about going old school if ..synchronize
doesn’t solve your particular problem.
Cheers.