Get rid of "previous known host file not found"

Just adding a comment for the archives

I just ran into this problem using ansible 1.4.4 from cron. I fixed the issues by running my cron job with

USER=username /usr/bin/ansible …

it might be better to use

import getpass

user_host_file = os.path.expandvars(“~{}/.ssh/known_hosts”.format(getpass.getuser()))

although looking at trunk i think the current version would now work from cron

Ansible 1.4.4 is somewhat out of date at this point, the most recent update is 1.7.1 and is important that you upgrade since it contains a few security fixes.
You’ll also be missing a lot of fixes/improvements, modules, and options.

If you have a problem in 1.7.1, do let us know!

No problem im just using the stock release in ubuntu LTS 12.04. I will look at creating my own package shortly as i have already come across some other features that are missing in this version.

Thanks John

You can add our PPA as indicated in http://docs.ansible.com/intro_installation.html#latest-releases-via-apt-ubuntu if you like…

Great thanks ill look at that on monday

​+1, especially on precise, as it needs a backported package too.​