I encountered an Ansible-pull “unknown hostkey” error.
Starting ansible-pull at 2014-06-03 11:17:00 localhost | FAILED >> { "failed": true, "msg": "git.repo.com has an unknown hostkey. Set accept_hostkey to True or manually add the hostkey prior to running the git module" }
After some digging around, turns out the latest Ansible has no such problem, but the installed “ansible 1.5.5” running the pull has. Apparently that used to be a bug.
Simple solution is obviously to upgrade, but why go for the simple solution. Turns out this ignores most of the options concerning host-keys, except /etc/ssh/ssh_known_hosts
That means that adding the repository ssh-key will enable you to pull the repository.
ssh-keyscan git.repo.com >> /etc/ssh/ssh_known_hosts
Fun fun.