You'll need to set the inventory variable ansible_python_interpreter to point at the python inside your virtualenv.
Ansible is still trying to use system python for executing modules, basically. On Wed, Sep 24, 2014 at 2:58 PM, David Neudorfer < [email protected]> wrote: > Inside a fresh virtualenv I installed httplib and ansible and run the > following command but ansible complains that httplib2 isn't installed. Any > suggestions how I get this working? Thanks for the help! > > (httplib2_test)[root@v-hegemon hegemon]# ansible -i > /opt/wp/app/hegemon/ansible/hosts.vagrant localhost -m uri -a "url= > google.com status_code=200 return_content=yes" > localhost | FAILED >> { > "failed": true, > "msg": "httplib2 is not installed" > } > > (httplib2_test)[root@v-hegemon hegemon]# pip freeze > Jinja2==2.7.3 > MarkupSafe==0.23 > PyYAML==3.11 > ansible==1.7.1 > ecdsa==0.11 > httplib2==0.9 > paramiko==1.15.1 > pycrypto==2.6.1 > wsgiref==0.1.2 > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/9c9344b6-f9fb-4e99-bef8-630dc33aa2aa%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/9c9344b6-f9fb-4e99-bef8-630dc33aa2aa%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwHkJGG58iXwebipyjsR1%2BpMJk%2BpBD-UgVpiLNObT_uRw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
