1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add option to disable ControlPath to ssh options during rsync

Fixes #8473
This commit is contained in:
James Cammarata 2014-08-18 12:59:00 -05:00
parent e3895840d1
commit e2b8f05b79

View file

@ -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'"