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

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
This commit is contained in:
James Cammarata 2017-07-05 09:42:04 -05:00
parent f8d522de69
commit 95a0fe37da

View file

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