A couple of thoughts that have been bubbling around my head following the many mentions of using rsync from within ansible to move sets of files from the management host to the destination host(s).
We can use rsync as a local command, working over its own ssh connection.
However we already have a (potential at least) ssh connection to the target, and ansible may also have the capability to promote the privileges at the target end up to root using sudo - a capability we do not easily have just within rsync.
rsync runs as a client on the local end, and invokes a server process on the remote end. There are magic options (--server and --sender) used to designate what the rsync binary should be doing - these are pretty much undocumented and probably things we aren't meant to be fiddling with (so, a challenge!).
Is there a way we can do that setup for rsync, so that we run rsync --server on the remote end, and hook it up to the output of rsync --sender at the local end in a way that is relatively portable across rsync versions etc, and gives us the ability to add rsync goodness to all the additional capabilities that the copy module has over using local command to invoke rsync?
Comments?
Nigel.