mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00: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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user