mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-12 20:00:58 +00:00
Print specific error for BadHostKeyException (#24120)
This commit is contained in:
@@ -245,6 +245,8 @@ class Connection(ConnectionBase):
|
||||
port=port,
|
||||
**sock_kwarg
|
||||
)
|
||||
except paramiko.ssh_exception.BadHostKeyException as e:
|
||||
raise AnsibleConnectionFailure('host key mismatch for %s' % e.hostname)
|
||||
except Exception as e:
|
||||
msg = str(e)
|
||||
if "PID check failed" in msg:
|
||||
|
||||
Reference in New Issue
Block a user