From b06f3bbb22a1fb058aea7abc8c22997c477393c5 Mon Sep 17 00:00:00 2001 From: "peter.jang" Date: Wed, 3 Aug 2016 03:34:41 +0900 Subject: [PATCH] fix for rsync protocol (#4211) --- lib/ansible/modules/files/synchronize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/files/synchronize.py b/lib/ansible/modules/files/synchronize.py index 1657bd1a1e6..83addcbb133 100644 --- a/lib/ansible/modules/files/synchronize.py +++ b/lib/ansible/modules/files/synchronize.py @@ -407,10 +407,10 @@ def main(): if ssh_args: ssh_opts = '%s %s' % (ssh_opts, ssh_args) - if source.startswith('rsync://') and dest.startswith('rsync://'): + if source.startswith('"rsync://') and dest.startswith('"rsync://'): module.fail_json(msg='either src or dest must be a localhost', rc=1) - if not source.startswith('rsync://') and not dest.startswith('rsync://'): + if not source.startswith('"rsync://') and not dest.startswith('"rsync://'): if dest_port != 22: cmd += " --rsh 'ssh %s %s -o Port=%s'" % (private_key, ssh_opts, dest_port) else: