From 65856f2231f4a74e0a8c72ab5e61ec042ff0eaf1 Mon Sep 17 00:00:00 2001 From: "peter.jang" Date: Sat, 9 Apr 2016 00:42:07 +0900 Subject: [PATCH] added suport rsync protocol (#12197) * added suport rsync protocol * use startswith method for safety --- lib/ansible/plugins/action/synchronize.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/plugins/action/synchronize.py b/lib/ansible/plugins/action/synchronize.py index 0a74ed2d95..e21e008408 100644 --- a/lib/ansible/plugins/action/synchronize.py +++ b/lib/ansible/plugins/action/synchronize.py @@ -51,6 +51,10 @@ class ActionModule(ActionBase): ''' formats rsync rsh target, escaping ipv6 addresses if needed ''' user_prefix = '' + + if path.startswith('rsync://'): + return path + if user: user_prefix = '%s@' % (user, )