mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Fix hang on unkown host key for network_cli (#32937)
* Don't prompt on force_persistent either * Propagate persistence setting to lower paramiko connection
This commit is contained in:
parent
1a2eb319fe
commit
37d8242e44
2 changed files with 3 additions and 4 deletions
|
@ -188,7 +188,7 @@ class MyAddPolicy(object):
|
|||
fingerprint = hexlify(key.get_fingerprint())
|
||||
ktype = key.get_name()
|
||||
|
||||
if C.USE_PERSISTENT_CONNECTIONS:
|
||||
if C.USE_PERSISTENT_CONNECTIONS or self.connection.force_persistence:
|
||||
# don't print the prompt string since the user cannot respond
|
||||
# to the question anyway
|
||||
raise AnsibleError(AUTHENTICITY_MSG[1:92] % (hostname, ktype, fingerprint))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue