-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ansible 2.0 Breaks synchronize functionality, and completely changed the behavior. #11649
Comments
Confirmed the second issue. Here's a small playbook that shows the problems:
In current devel, both of those plays are copying the remote /etc/redhat-release file to a file on the remote machine. So the remote machine ends up with /var/tmp/fedora-rel and /var/tmp/redhat-rel and both of those are the /etc/redhat-release from the rhel6 box, not the one from the fedora box that ansible-playbook is being run from. |
Yes, the first issue and the second are actually related, since it tries to sync two folders on remote, and I do not have any ssh info on the remote, when src tries to go to ubuntu@ip:dest, it fails, and gives me permission denied error. I also tried to setup my ssh info on the remote server, and then it succeeded. Therefore, that is the issue. |
Small update on my debugging of this -- in 1.9.x the tasks run the ansible module (not just the action plugin) on the controller rather than the remote host. In 2.0 it's running the ansible module on the remote host. Will need to see what is happening with delegate_to to determine if there's a reason that the ansible module exists and try to find the specialcase code in 1.9 that handles this. |
This works if delegate_to: localhost is explicitly stated. jimi-c's theory is that in v2 we've already built the connection by the time the synchronize action plugin's run() method is called. So all of the fancy stuff it tries to do to modify how the connection is setup isn't having an effect. Will try to have the synchronize action plugin create its own connection object and use that instead. |
delegating to $other host instead of localhost is also working. That would seem to validate jimi-c's theory. |
…meant that rsync was run on the wrong host. Fixes #11649
Alright everyone, that PR makes syynchronize work at least for these basic cases for me. Feel free to let us know if you notice additional regressions. Closing This TicketHi! We believe recent commits (likely detailed above) should resolve this question or problem for you. This will also be included in the next major release. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular Thank you! |
Issue type:
Bug report
Ansible version:
devel
Environment:
Unrelated but
Host: Mac 10.10.3
Target: Ubuntu 10.4
The first issue is:
In 1.9, when I want to sync two folders on the remote server, I do:
Now, it keeps giving me permission denied error.
The second issue is:
It looks like now it defaults to sync two folder on the remote server even if I don't specify delegate_to, in 1.9.2, without delegate_to, src will be my local, and dest will be my remote.
Thanks
The text was updated successfully, but these errors were encountered: