1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Check real user's known_hosts when sudo ansible...

closes #4834
This commit is contained in:
Serge van Ginderachter 2013-11-09 13:29:39 +01:00
parent 3f4b2d4a24
commit 80fd22dce6

View file

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