Commit 4b9127f0 by jctanner

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
parents 24f11168 953dc6b3
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment