From 58573187f83ee290a9dbceadded68246c4d0a0a4 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 22 Sep 2015 13:59:37 -0700 Subject: [PATCH] Change the example of rsync_opts to use a list instead of a string Fixes #9889 --- lib/ansible/modules/files/synchronize.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/files/synchronize.py b/lib/ansible/modules/files/synchronize.py index 73b0bb13364..0332c7580d2 100644 --- a/lib/ansible/modules/files/synchronize.py +++ b/lib/ansible/modules/files/synchronize.py @@ -204,10 +204,11 @@ synchronize: mode=pull src=some/relative/path dest=/some/absolute/path # Synchronization of src on delegate host to dest on the current inventory host. # If delegate_to is set to the current inventory host, this can be used to synchronize -# two directories on that host. -synchronize: > - src=some/relative/path dest=/some/absolute/path - delegate_to: delegate.host +# two directories on that host. +synchronize: + src: some/relative/path + dest: /some/absolute/path +delegate_to: delegate.host # Synchronize and delete files in dest on the remote host that are not found in src of localhost. synchronize: src=some/relative/path dest=/some/absolute/path delete=yes @@ -222,7 +223,12 @@ synchronize: src=some/relative/path dest=/some/absolute/path rsync_path="sudo rs + /var/conf # include /var/conf even though it was previously excluded # Synchronize passing in extra rsync options -synchronize: src=/tmp/helloworld dest=/var/www/helloword rsync_opts=--no-motd,--exclude=.git +synchronize: + src: /tmp/helloworld + dest: /var/www/helloword + rsync_opts: + - "--no-motd" + - "--exclude=.git" '''