Commit 68afd9da by jctanner

Merge pull request #4866 from sergevanginderachter/known_hosts_sudo

Check real user's known_hosts when sudo ansible...
parents a0c49fe0 80fd22dc
......@@ -116,7 +116,7 @@ class Connection(object):
os.close(self.wfd)
def not_in_host_file(self, host):
host_file = os.path.expanduser("~/.ssh/known_hosts")
host_file = os.path.expanduser(os.path.expandvars("~${USER}/.ssh/known_hosts"))
if not os.path.exists(host_file):
print "previous known host file not found"
return True
......
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