# register not working for uri module

**URL:** <https://forum.ansible.com/t/register-not-working-for-uri-module/38008>\
**Category:** Ansible Project\
**Created:** [May 18, 2023, 6:00pm UTC](https://forum.ansible.com/t/register-not-working-for-uri-module/38008 "2023-05-18T18:00:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Narmada\_Karthika](https://avatars.discourse-cdn.com/v4/letter/n/b5e925/32.png) [@Narmada\_Karthika](https://forum.ansible.com/u/Narmada_Karthika)\
**Post date:** [May 18, 2023, 6:00pm UTC](https://forum.ansible.com/t/register-not-working-for-uri-module/38008/1 "2023-05-18T18:00:52Z")

</div>

{“changed”: false, “msg”: "Unsupported parameters for (ansible.legacy.uri) module: register. Supported parameters include: ca\_path, serole, client\_key, use\_proxy, setype, attributes (attr), force (thirsty), use\_gssapi, force\_basic\_auth, seuser, src, validate\_certs, client\_cert, return\_content, unix\_socket, unsafe\_writes, headers, url, creates, selevel, http\_agent, mode, body, status\_code, removes, method, remote\_src, dest, url\_password (password), url\_username (user), timeout, group, body\_format, follow\_redirects,

this is the error I am getting  
here is my playbook

— - name: make a curl call hosts: localhost become: true user: root gather\_facts: no tasks: - name: Create Weekly Release Sequence ansible.builtin.uri: url: ‘[https://google.com](https://google.com)’ method: GET return\_content: yes body\_format: json register: result - debug: var: result.stdout no\_log: False

---

<div class="post-metadata">

**Author:** ![Jorge\_Rua1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@Jorge\_Rua1](https://forum.ansible.com/u/Jorge_Rua1)\
**Post date:** [May 18, 2023, 6:04pm UTC](https://forum.ansible.com/t/register-not-working-for-uri-module/38008/2 "2023-05-18T18:04:32Z")

</div>

Your issue is that the register is not part of the module, but of the task. Check your indentation.

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [May 18, 2023, 6:05pm UTC](https://forum.ansible.com/t/register-not-working-for-uri-module/38008/3 "2023-05-18T18:05:08Z")

</div>

Pull your “register:” to the left. It’s a task key word, so should line up with “name:” and “ansible.builtin.uri”, rather than with “url:”, “method:”, etc.

---

<div class="post-metadata">

**Author:** ![Narmada\_Karthika](https://avatars.discourse-cdn.com/v4/letter/n/b5e925/32.png) [@Narmada\_Karthika](https://forum.ansible.com/u/Narmada_Karthika)\
**Post date:** [May 18, 2023, 6:13pm UTC](https://forum.ansible.com/t/register-not-working-for-uri-module/38008/4 "2023-05-18T18:13:56Z")

</div>

got it, thanks, never realized that
