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
synchronize does not follow "delegate_to" setting #7250
Comments
Synchronize is a wrapper around producing local_action: shell rsync commands. It runs between the remote host and the local one, but it can't be used to bridge rsync's between two different hosts. If you wanted this, I'd just call "shell: rsync" directly. We can look at making the documentation more clear on this. |
I just ran into this same issue - would be great if the docs reflected the fact that it doesn't do a sync between two remote hosts. Also thought it was a bug and was about to file it as such when I found this existing issue report. Though it certainly would be great if this functionality existed - sync between two remote hosts is a common scenario with many use-cases. |
Is this still the case? I'm able to use delegate_to: in a synchronize task and ansible connects to the delegate host, then runs rsync locally on the deletate host to push the directory to the remote host. I had to add the following to allow the delegate to connect to the remote host:
Is it a bug that this works? |
I also having it working when passing in |
This is working for me in 1.9.2 and we've just merged a patch to make sure that this is working in ansible-2.0 here: #11822 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:
ansible 1.5, initially. Also tried:
ansible 1.6 (devel 40a7a30) last updated 2014/05/01 11:43:40 (GMT -400)
Environment:
CentOS 6.5 (all hosts)
Summary:
The documentation for the synchronize action leads me to believe (and #ansible IRC chats confirm) that the expected behaviour of the snippet below is that the src of the rsync will be delegate.host:some/relative/path. My experience is that the source is instead some/relative/path on the host from whence the action is issued.
synchronize: >
src=some/relative/path dest=/some/absolute/path
delegate_to: delegate.host
Steps To Reproduce:
Follow bash commands in http://pastebin.com/SA9aHt2J They are also reproduced below.
Expected Results:
Actual Results:
The text was updated successfully, but these errors were encountered: