mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #5695 from kormoc/fix_git_check_hostkey_2
Fix case where there is a ~/.ssh/known_hosts file and the host key is only in /etc/ssh/ssh_known_hosts
This commit is contained in:
commit
4b9127f0af
1 changed files with 1 additions and 2 deletions
|
@ -40,8 +40,7 @@ def check_hostkey(module, fqdn):
|
|||
this_cmd = keygen_cmd + " -H -F " + fqdn
|
||||
rc, out, err = module.run_command(this_cmd)
|
||||
|
||||
if rc == 0:
|
||||
if out != "":
|
||||
if rc == 0 and out != "":
|
||||
result = True
|
||||
else:
|
||||
# Check the main system location
|
||||
|
|
Loading…
Reference in a new issue