mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
makes ssh plugin resilient against invalid entries in hosts file
fixes #10238
This commit is contained in:
parent
e349004325
commit
496186f5de
1 changed files with 16 additions and 14 deletions
|
@ -243,6 +243,8 @@ class Connection(ConnectionBase):
|
|||
tokens = line.split()
|
||||
if not tokens:
|
||||
continue
|
||||
|
||||
if isinstance(tokens, list) and tokens: # skip invalid hostlines
|
||||
if tokens[0].find(self.HASHED_KEY_MAGIC) == 0:
|
||||
# this is a hashed known host entry
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue