TASK: [Get tenant id] *********************************************************
<localhost> REMOTE_MODULE uri url="http://example.com:35357/v2.0//tenants?name=tenant2" method=GET timeout=30 return_content=yes HEADER_User-Agent=python-keystoneclient HEADER_X-Auth-Token="*****" HEADER_Content-Type="application/json"
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1398201502.91-131706600599036 && echo $HOME/.ansible/tmp/ansible-tmp-1398201502.91-131706600599036']
<localhost> PUT /var/folders/t2/h22337c12hn279xwd4s9fk7s8_088c/T/tmpLEIdmk TO /Users/kbroughton/.ansible/tmp/ansible-tmp-1398201502.91-131706600599036/uri
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=turelpokuakqdltyqvhjhfyyvmrqaail] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-turelpokuakqdltyqvhjhfyyvmrqaail; /usr/bin/python /Users/kbroughton/.ansible/tmp/ansible-tmp-1398201502.91-131706600599036/uri; rm -rf /Users/kbroughton/.ansible/tmp/ansible-tmp-1398201502.91-131706600599036/ >/dev/null 2>&1'"'"''
failed: [localhost] => {"failed": true, "item": ""}
msg: httplib2 is not installed
FATAL: all hosts have already failed -- aborting
[kbroughton@mb-kbroughton:lynx-ansible/21ct-ansible + (develop)] which python
/usr/local/bin/python
ansible seems to use /usr/bin/python, but that also can import httplib2
[kbroughton@mb-kbroughton:/21ct-ansible + (develop)] /usr/bin/python
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import httplib2
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAO2fFsXRGrp20pH09FK_ez6FChYsMOFEjDoLhA3HQjmt-zPAJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
httplib2 is getting picked up from the same place for either python install.
[kbroughton@mb-kbroughton:Contents/MacOS] /usr/bin/python -c "import httplib2; print httplib2.__file__"
/usr/local/lib/python2.7/site-packages/httplib2/__init__.pyc
[kbroughton@mb-kbroughton:Contents/MacOS] /usr/local/bin/python -c "import httplib2; print httplib2.__file__"
/usr/local/lib/python2.7/site-packages/httplib2/__init__.pyc
PYTHONPATH is pointing there
[kbroughton@mb-kbroughton:Contents/MacOS] echo $PYTHONPATH
/usr/local/lib/python2.7/site-packages:/Users/kbroughton/vcp/git/mentat/ansible/lib:
But i'm not sure how to force pip to install it to the location that ansible has access to.
[kbroughton@mb-kbroughton:Contents/MacOS] export PYTHONPATH=''
[kbroughton@mb-kbroughton:Contents/MacOS] echo $PYTHONPATH
[kbroughton@mb-kbroughton:Contents/MacOS] pip install httplib2
Requirement already satisfied (use --upgrade to upgrade): httplib2 in /usr/local/lib/python2.7/site-packages
Cleaning up...
[kbroughton@mb-kbroughton:Contents/MacOS]
I suppose that pip belongs to the homebrew installed python, and i don't have pip installed for /usr/bin/python.
Setting ansible_python_interpreter=/usr/local/bin/python in the hosts file fixes the problem.
kesten