I am trying to install a package from a private git repo using ansible's pip module this way:
- name: Install my package
pip: name='git+ssh://git@github.com/mycompany/my-repo.git#egg=0.1.0'
virtualenv=/path/to/venv
But this hangs when I try to provision this with vagrant, most likely because it prompts for confirmation to add the key to the list of known hosts. Indeed when I run this in vagrant:
pip install git+ssh://git@github.com/mycompany/my-repo.git#egg=0.1.0
It prompts for confirmation to add github to the know hosts and then works fine.
If I clone it with accept_hostkey=yes
:
- name: Clone repo
git: repo=git@github.com:mycompany/my-repo.git
dest=/path/to/dest
accept_hostkey=yes
recursive=no
it works fine because it accepts the host key that is copied on vagrant. With the pip module there is no such option, any way around this?
As an alternative I could do a clone and then a python setup.py install
but I'd rather do that in one step with pip.