summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter.jang <hsjang@gmail.com>2016-08-03 03:34:41 +0900
committerToshio Kuratomi <toshio@fedoraproject.org>2016-08-08 09:05:02 -0700
commitea281a85b81b0e2e2a8eea0c88bd61b9e97bcc08 (patch)
tree42389d639e05fc2e08030e6c490017448aaf807b
parentcf4e21c69dc201effbef2e5bd0f62e1f5b7fcbcf (diff)
downloadansible-modules-core-ea281a85b81b0e2e2a8eea0c88bd61b9e97bcc08.tar.gz
fix for rsync protocol (#4211)
-rw-r--r--files/synchronize.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/synchronize.py b/files/synchronize.py
index b06e3b62..a40ce562 100644
--- a/files/synchronize.py
+++ b/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: