UserKnownHostsFile=/dev/null when verify_host: false

This is a new fix to replace #20361 due to the synchronize module changing
sufficiently to make that commit no longer merge cleanly.

Fixes #20361
Related to #20311
pull/26434/merge
James Cammarata 7 years ago
parent f8d522de69
commit 95a0fe37da

@ -483,7 +483,7 @@ def main():
if dest_port is not None:
ssh_cmd.extend(['-o', 'Port=%s' % dest_port])
if not verify_host:
ssh_cmd.extend(['-o', 'StrictHostKeyChecking=no'])
ssh_cmd.extend(['-o', 'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null'])
ssh_cmd_str = ' '.join(shlex_quote(arg) for arg in ssh_cmd)
if ssh_args:
ssh_cmd_str += ' %s' % ssh_args

Loading…
Cancel
Save