mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
synchronize: don't add ssh_args to ssh_opts when false or null
This commit is contained in:
parent
2e9462aa21
commit
118382ca70
1 changed files with 5 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue