summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorJames Cammarata <jimi@sngx.net>2014-08-18 12:59:00 -0500
committerJames Cammarata <jimi@sngx.net>2014-08-18 12:59:00 -0500
commit989b14de80cd6e41820f2cb98296463811203a78 (patch)
tree9ac15474f1c4006327e310c44ac9121366448303 /files
parentd6375cd3c10c7dafd874bee71fcb584441eecd35 (diff)
downloadansible-modules-extras-989b14de80cd6e41820f2cb98296463811203a78.tar.gz
Add option to disable ControlPath to ssh options during rsync
Fixes #8473
Diffstat (limited to 'files')
-rw-r--r--files/synchronize9
1 files changed, 5 insertions, 4 deletions
diff --git a/files/synchronize b/files/synchronize
index 7e9ea8e0..842dd863 100644
--- a/files/synchronize
+++ b/files/synchronize
@@ -303,17 +303,18 @@ def main():
else:
private_key = '-i '+ private_key
+ ssh_opts = '-S none -o StrictHostKeyChecking=no'
if dest_port != 22:
- cmd += " --rsh '%s %s -o %s -o Port=%s'" % ('ssh', private_key,
- 'StrictHostKeyChecking=no', dest_port)
+ cmd += " --rsh 'ssh %s %s -o Port=%s'" % (private_key, ssh_opts, dest_port)
else:
- cmd += " --rsh '%s %s -o %s'" % ('ssh', private_key,
- 'StrictHostKeyChecking=no') # need ssh param
+ cmd += " --rsh 'ssh %s %s'" % (private_key, ssh_opts) # need ssh param
if rsync_path:
cmd = cmd + " --rsync-path=%s" % (rsync_path)
+
if rsync_opts:
cmd = cmd + " " + " ".join(rsync_opts)
+
changed_marker = '<<CHANGED>>'
cmd = cmd + " --out-format='" + changed_marker + "%i %n%L'"