mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-14 04:41:27 +00: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user