Skip to content

Commit

Permalink
Merge pull request ansible#4866 from sergevanginderachter/known_hosts…
Browse files Browse the repository at this point in the history
…_sudo

Check real user's known_hosts when sudo ansible...
  • Loading branch information
jctanner committed Nov 19, 2013
2 parents a0c49fe + 80fd22d commit 68afd9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/runner/connection_plugins/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _send_password(self):
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
Expand Down

0 comments on commit 68afd9d

Please sign in to comment.