1
0
Fork 0
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:
jctanner 2014-01-20 19:03:27 -08:00
commit 4b9127f0af

View file

@ -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