# Debug Module Returns "Hello, World!" when a message is specified.

**URL:** <https://forum.ansible.com/t/debug-module-returns-hello-world-when-a-message-is-specified/26476>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [January 13, 2018, 3:54am UTC](https://forum.ansible.com/t/debug-module-returns-hello-world-when-a-message-is-specified/26476 "2018-01-13T03:54:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philip\_Gregory](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/philip_gregory/32/3105_2.png) [@Philip\_Gregory](https://forum.ansible.com/u/Philip_Gregory)\
**Post date:** [January 13, 2018, 3:54am UTC](https://forum.ansible.com/t/debug-module-returns-hello-world-when-a-message-is-specified/26476/1 "2018-01-13T03:54:21Z")

</div>

Using Ansible 2.4.2.0 on Ubuntu 16.04, I try running a plaubook with the following:

- name: Create repo line in Ubuntu/Debian  
command: bash -c "echo "deb [arch=amd64] [https://download.docker.com/linux/debian](https://download.docker.com/linux/debian) $(lsb\_release -cs) stable" "  
register: docker\_repo\_line  
when:  
ansible\_distribution == ‘Debian’  
or  
ansible\_distribution == ‘Ubuntu’
- debug:  
msg: “{{ docker\_repo\_line.stdout }}”  
when:  
ansible\_distribution == ‘Debian’  
or  
ansible\_distribution == ‘Ubuntu’
- name: Add Docker Repo on Ubuntu/Debian  
apt\_repository:  
repo: “{{ docker\_repo\_line.stdout }}”  
state: present  
when:  
ansible\_distribution == ‘Debian’  
or  
ansible\_distribution == ‘Ubuntu’

However, the Debig Module set the message as “hello, world” when I run the command. Looking at the module documentation, this is the default if no msg is specified. However, I do I have line for hte message. Am I missing something here?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [January 14, 2018, 8:41am UTC](https://forum.ansible.com/t/debug-module-returns-hello-world-when-a-message-is-specified/26476/2 "2018-01-14T08:41:22Z")

</div>

My guess is all the module results are contained in a key called 'results' within the var that you registered.

Try this

- debug:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var: "{{ docker\_repo\_line }}"

I suspect that the bit you want is in  
- debug:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msg: "{{ docker\_repo\_line.results.stdout }}"

But try inspecting the whole of the var. If there is a lot of output, use something like Jsonlint.com to pretty print the json so that you can get a clearer idea of what is being returned.

Hope this helps,

Jon
