Add option to disable ControlPath to ssh options during rsync
Fixes #8473
This commit is contained in:
parent
e3895840d1
commit
e2b8f05b79
1 changed files with 5 additions and 4 deletions
|
@ -303,17 +303,18 @@ def main():
|
||||||
else:
|
else:
|
||||||
private_key = '-i '+ private_key
|
private_key = '-i '+ private_key
|
||||||
|
|
||||||
|
ssh_opts = '-S none -o StrictHostKeyChecking=no'
|
||||||
if dest_port != 22:
|
if dest_port != 22:
|
||||||
cmd += " --rsh '%s %s -o %s -o Port=%s'" % ('ssh', private_key,
|
cmd += " --rsh 'ssh %s %s -o Port=%s'" % (private_key, ssh_opts, dest_port)
|
||||||
'StrictHostKeyChecking=no', dest_port)
|
|
||||||
else:
|
else:
|
||||||
cmd += " --rsh '%s %s -o %s'" % ('ssh', private_key,
|
cmd += " --rsh 'ssh %s %s'" % (private_key, ssh_opts) # need ssh param
|
||||||
'StrictHostKeyChecking=no') # need ssh param
|
|
||||||
|
|
||||||
if rsync_path:
|
if rsync_path:
|
||||||
cmd = cmd + " --rsync-path=%s" % (rsync_path)
|
cmd = cmd + " --rsync-path=%s" % (rsync_path)
|
||||||
|
|
||||||
if rsync_opts:
|
if rsync_opts:
|
||||||
cmd = cmd + " " + " ".join(rsync_opts)
|
cmd = cmd + " " + " ".join(rsync_opts)
|
||||||
|
|
||||||
changed_marker = '<<CHANGED>>'
|
changed_marker = '<<CHANGED>>'
|
||||||
cmd = cmd + " --out-format='" + changed_marker + "%i %n%L'"
|
cmd = cmd + " --out-format='" + changed_marker + "%i %n%L'"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue