# uri module fails while httplib2 is installed

**URL:** <https://forum.ansible.com/t/uri-module-fails-while-httplib2-is-installed/13874>\
**Category:** Ansible Project\
**Created:** [November 9, 2013, 3:32pm UTC](https://forum.ansible.com/t/uri-module-fails-while-httplib2-is-installed/13874 "2013-11-09T15:32:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Vonk](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@Lars\_Vonk](https://forum.ansible.com/u/Lars_Vonk)\
**Post date:** [November 9, 2013, 3:32pm UTC](https://forum.ansible.com/t/uri-module-fails-while-httplib2-is-installed/13874/1 "2013-11-09T15:32:10Z")

</div>

Hi,

I am trying to download some resource from the web using the uri module as follows

- name: Download the resource from the web  
uri: url={{app\_url}} dest=/opt/app creates=/opt/app/{{app\_version}}

This keeps failing with the following error:

_failed: [192.168.111.222] =\> {“failed”: true, “item”: “”}_  
_msg: httplib2 is not installed_

httplib2 is installed however:

lars (master)$ pip install httplib2  
Requirement already satisfied (use --upgrade to upgrade): httplib2 in /usr/local/lib/python2.7/site-packages  
Cleaning up…

Any idea what can be the cause?

Thanks, Lars

---

<div class="post-metadata">

**Author:** ![Lars\_Vonk](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@Lars\_Vonk](https://forum.ansible.com/u/Lars_Vonk)\
**Post date:** [November 10, 2013, 1:40pm UTC](https://forum.ansible.com/t/uri-module-fails-while-httplib2-is-installed/13874/2 "2013-11-10T13:40:48Z")

</div>

Never mind… the task is run on the server and not on my laptop… doh!

Lars

---

<div class="post-metadata">

**Author:** ![Toby\_Corkindale](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toby\_Corkindale](https://forum.ansible.com/u/Toby_Corkindale)\
**Post date:** [August 29, 2014, 1:43am UTC](https://forum.ansible.com/t/uri-module-fails-while-httplib2-is-installed/13874/3 "2014-08-29T01:43:52Z")

</div>

I just spent half an hour trying to work out why this was failing too.  
It’d be good if the uri module made it clearer about where the fetch was run from, I think.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [August 29, 2014, 12:04pm UTC](https://forum.ansible.com/t/uri-module-fails-while-httplib2-is-installed/13874/4 "2014-08-29T12:04:56Z")

</div>

Yeah, this is not something Ansible’s going to do, because it’s an intrinsitic language feature:

- hosts: webservers  
tasks:
- …

Will ALWAYS run on those servers, and that’s true of all the base modules.

Unless you have a step in the middle that says local\_action, etc, it’s going to run where you tell it 🙂
