Every variation fails for me. Fascinating. I see you are running Ansible Engine, where I’m running AWX. The problem may be, though, that you are sending the private key and AWX is using the password to log in. I think I’m going to give up and go with the CLI solution. I’m not sure I’m going to gain nearly enough from the posix solution to justify the additional work it would take to get it running. Thank you.
If you’re using passwords to authenticate, then in your examples where the play “just hangs” may be prompting for a password in a context that Ansible/AWX doesn’t handle. If that’s the case, then using command/shell may also hang for the same reasons. You may need to use the pexpect module to send your password to stdin when rsync prompts for it.
I do not have this problem with CLI rsync. It works perfectly. I have rsync set up to use ssh key passwordless login, so rsync from Ansible is also working perfectly. I would expect ansible.posix.synchronize to use the same technique, but it seems to be different in some important way. I’d be very surprised if the synchronize method were trying to proxy the password forward from the login, but I’ve been very surprised before.
In any case, I have a 100% working solution with CLI rsync.
Thank you!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.