diff options
author | John R Barker <john@johnrbarker.com> | 2018-09-25 17:22:07 +0100 |
---|---|---|
committer | Alicia Cozine <879121+acozine@users.noreply.github.com> | 2018-09-25 11:22:07 -0500 |
commit | ab1b602053b76cb05bb320acbd0d2bc5d5e90ea0 (patch) | |
tree | cde7e821bd1331181a64d70dd89fa4cf43838805 | |
parent | 518c90dc68c18d8582c6cfcdccb196f3afc20e6a (diff) | |
download | ansible-ab1b602053b76cb05bb320acbd0d2bc5d5e90ea0.tar.gz |
Update synchronize.py, mention variable ansible_rsync_path needed for different local rsync binary (#41870) (#46110)
* Update synchronize.py
If you want a different rsync binary on the local side, you need to set task variable ansible_rsync_path.
See examples.
Variable ansible_rsync_path looks to not be documented anywhere. If documented, needs to be said that is does not belong to synchronise options, instead belongs to tasks. (Sorry, I have no better wording)
(cherry picked from commit c44de1069ca137280350781b13bab13f01ecd95a)
-rw-r--r-- | lib/ansible/modules/files/synchronize.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/ansible/modules/files/synchronize.py b/lib/ansible/modules/files/synchronize.py index 616cfcbdee..198d515d67 100644 --- a/lib/ansible/modules/files/synchronize.py +++ b/lib/ansible/modules/files/synchronize.py @@ -114,9 +114,10 @@ options: rsync_path: description: - Specify the rsync command to run on the remote host. See C(--rsync-path) on the rsync man page. + - To specify the rsync command to run on the local host, you need to set this your task var C(ansible_rsync_path). rsync_timeout: description: - - Specify a --timeout for the rsync command in seconds. + - Specify a C(--timeout) for the rsync command in seconds. default: 0 set_remote_user: description: @@ -301,6 +302,19 @@ EXAMPLES = ''' src: /tmp/path_a/foo.txt dest: /tmp/path_b/foo.txt link_dest: /tmp/path_a/ + +# Specify the rsync binary to use on remote host and on local host +- hosts: groupofhosts + vars: + ansible_rsync_path: "/usr/gnu/bin/rsync" + + tasks: + - name: copy /tmp/localpath/ to remote location /tmp/remotepath + synchronize: + src: "/tmp/localpath/" + dest: "/tmp/remotepath" + rsync_path: "/usr/gnu/bin/rsync" + ''' |