Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

uri module complains that httplib2 is not installed even when httplib2 module is intalled #2921

Closed
bngsudheer opened this issue Jan 30, 2016 · 8 comments

Comments

@bngsudheer
Copy link
Contributor

Error from playbook: FAILED! => {"changed": false, "failed": true, "msg": "httplib2 >= 0.7 is not installed"}

Pip output: pip freeze | grep -i httplib
httplib2==0.7.7

ansible-playbook version: ansible-playbook 2.0.0.2

@bngsudheer bngsudheer changed the title uri modules complains that httplib2 is not installed even when httplib2 module is intalled uri module complains that httplib2 is not installed even when httplib2 module is intalled Jan 30, 2016
@sivel
Copy link
Member

sivel commented Jan 30, 2016

httplib2 must be installed on the remote target machine instead of the local control machine. Modules are executed on the targeted host, so if a module depends on a specific Python module, it needs to be installed on that target host.

I recommend using the pip module to install httplib2 as a task before using the uri module.

@sivel sivel closed this as completed Jan 30, 2016
@bngsudheer
Copy link
Contributor Author

Thanks for the clarification, @sivel. It would be nice to mention this in the documentation.

@johnculviner
Copy link

johnculviner commented Apr 18, 2016

@sivel There seems to be an increasing number of these "oh yeah you have to install this with pip in order to use it" and these frequently don't show up in the documentation. (as is the case with this one).

IMO Ansible is supposed to run on "vanilla linux boxes" which is why it uses python to begin with but stuff like this means it doesn't.

In the future maybe this stuff gets shipped over with SSH rather than rely on mutating the "global" state of your target box (aka you have to have PIP installed and install global PIP modules) in order to satisfy undocumented internal Ansible team design decisions. "Set up the box in a way just so Ansible works" is sounding more like Chef and Puppet which I think is a lot of what your users are trying to avoid.

Thoughts?

@sivel
Copy link
Member

sivel commented Apr 18, 2016

As of Ansible v2.0.2 which will be released soon, httplib2 is no longer a dependency of the uri module.

@johnculviner
Copy link

Awesome, music to my ears! Sounds like you guys are sticking with the "vanilla linux boxes" approach. Excellent 👍

@fusion94
Copy link

@sivel did this make it into v2.0.2 or as the documentation says: The dependency on httplib2 was removed in Ansible 2.1

@sivel
Copy link
Member

sivel commented May 23, 2016

@fusion94 it was backported into 2.0.2 to address some other issues, it was originally slated to be part of 2.1.

@fusion94
Copy link

@sivel awesome thanks...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants