# URL module can not use body from role task

**URL:** <https://forum.ansible.com/t/url-module-can-not-use-body-from-role-task/18750>\
**Category:** Ansible Project\
**Created:** [July 13, 2015, 11:04pm UTC](https://forum.ansible.com/t/url-module-can-not-use-body-from-role-task/18750 "2015-07-13T23:04:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phill\_Pafford](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@Phill\_Pafford](https://forum.ansible.com/u/Phill_Pafford)\
**Post date:** [July 13, 2015, 11:04pm UTC](https://forum.ansible.com/t/url-module-can-not-use-body-from-role-task/18750/1 "2015-07-13T23:04:17Z")

</div>

How can I execute a REST call to an API from a role

[http://docs.ansible.com/uri\_module.html](http://docs.ansible.com/uri_module.html)

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 13, 2015, 11:27pm UTC](https://forum.ansible.com/t/url-module-can-not-use-body-from-role-task/18750/2 "2015-07-13T23:27:03Z")

</div>

indent everything after uri, up to register (non inclusive).

---

<div class="post-metadata">

**Author:** ![Phill\_Pafford](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@Phill\_Pafford](https://forum.ansible.com/u/Phill_Pafford)\
**Post date:** [July 14, 2015, 11:39am UTC](https://forum.ansible.com/t/url-module-can-not-use-body-from-role-task/18750/3 "2015-07-14T11:39:05Z")

</div>

DOH! Thanks that helped! still doesn’t solve my issue but at least it does solve it executing
