Merge pull request #1249 from rhartkopf/ssh_args_fix

synchronize: don't add ssh_args to ssh_opts when false or null
This commit is contained in:
Brian Coca 2015-05-04 11:17:44 -04:00
commit 0e4d1045af

View file

@ -316,7 +316,11 @@ def main():
else:
private_key = '-i '+ private_key
ssh_opts = '-S none -o StrictHostKeyChecking=no %s' % ssh_args
if ssh_args:
ssh_opts = '-S none -o StrictHostKeyChecking=no %s' % ssh_args
else:
ssh_opts = '-S none -o StrictHostKeyChecking=no'
if dest_port != 22:
cmd += " --rsh 'ssh %s %s -o Port=%s'" % (private_key, ssh_opts, dest_port)
else: