# print return values using debug

**URL:** <https://forum.ansible.com/t/print-return-values-using-debug/32626>\
**Category:** Ansible Project\
**Created:** [April 7, 2020, 8:52pm UTC](https://forum.ansible.com/t/print-return-values-using-debug/32626 "2020-04-07T20:52:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbie\_newbie](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@newbie\_newbie](https://forum.ansible.com/u/newbie_newbie)\
**Post date:** [April 7, 2020, 8:52pm UTC](https://forum.ansible.com/t/print-return-values-using-debug/32626/1 "2020-04-07T20:52:56Z")

</div>

Hi,

I am trying to print the return values from the get\_url module using the yaml code below:

- name: connect to server and download file  
get\_url:  
url: [http://10.0.0.2/file1.html](http://10.0.0.2/file1.html)  
register: all\_data

- name: print time it took to transfer file  
debug:  
var: all\_data

However, it always fails with the following error:

TASK [connect to server and download file] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [node1]: FAILED! =\> {“changed”: false, “msg”: “Unsupported parameters for (get\_url) module: register Supported parameters include: attributes, backup, checksum, client\_cert, client\_key, content, delimiter, dest, directory\_mode, follow, force, force\_basic\_auth, group, headers, http\_agent, mode, owner, regexp, remote\_src, selevel, serole, setype, seuser, sha256sum, src, timeout, tmp\_dest, unsafe\_writes, url, url\_password, url\_username, use\_proxy, validate\_certs”}

How do i get the return values for the module?

thank you

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [April 7, 2020, 8:54pm UTC](https://forum.ansible.com/t/print-return-values-using-debug/32626/2 "2020-04-07T20:54:19Z")

</div>

The problem is that you have `register` indented one level too far. It needs to be indented to the same level as `name` and `get_url`. It is not an argument for the module.

---

<div class="post-metadata">

**Author:** ![newbie\_newbie](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@newbie\_newbie](https://forum.ansible.com/u/newbie_newbie)\
**Post date:** [April 7, 2020, 9:03pm UTC](https://forum.ansible.com/t/print-return-values-using-debug/32626/3 "2020-04-07T21:03:29Z")

</div>

thank you Matt! yaml and space indentation!!! good lesson learnt  
it works now
