# variable registering everything, not just the stdout

**URL:** <https://forum.ansible.com/t/variable-registering-everything-not-just-the-stdout/22521>\
**Category:** Ansible Project\
**Created:** [September 9, 2016, 4:38pm UTC](https://forum.ansible.com/t/variable-registering-everything-not-just-the-stdout/22521 "2016-09-09T16:38:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jamie\_Thompson](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jamie\_Thompson](https://forum.ansible.com/u/Jamie_Thompson)\
**Post date:** [September 9, 2016, 4:38pm UTC](https://forum.ansible.com/t/variable-registering-everything-not-just-the-stdout/22521/1 "2016-09-09T16:38:06Z")

</div>

Hi all,

In a role I have the following:

- name: generate new UUID  
shell: uuidgen  
register: new\_uuid

When I call the variable in the template I get everything, not just the UUID.

Example:

UUID={{ new\_uuid }}

I get:

UUID={u’changed’: True, u’end’: u’2016-09-09 11:30:01.256488’, u’stdout’: u’f213d337-5c3b-4687-8061-70f74b49ed20’, u’cmd’: u’uuidgen’, u’start’: u’2016-09-09 11:30:01.251479’, u’delta’: u’0:00:00.005009’, u’stderr’: u’‘, u’rc’: 0, ‘stdout\_lines’: [u’f213d337-5c3b-4687-8061-70f74b49ed20’], u’warnings’: }

All of my other registered variables work correctly, just this one is giving me a problem. Anyone know what I am doing wrong?

Thanks!

jamie

---

<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:** [September 9, 2016, 5:05pm UTC](https://forum.ansible.com/t/variable-registering-everything-not-just-the-stdout/22521/2 "2016-09-09T17:05:39Z")

</div>

it is working as expected, you always get the full payload from the module, what you want is this:

UUID={{ new\_uuid.stdout }}

---

<div class="post-metadata">

**Author:** ![Jamie\_Thompson](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jamie\_Thompson](https://forum.ansible.com/u/Jamie_Thompson)\
**Post date:** [September 9, 2016, 5:53pm UTC](https://forum.ansible.com/t/variable-registering-everything-not-just-the-stdout/22521/3 "2016-09-09T17:53:01Z")

</div>

Excellent. Thank you! I was tracking down that line of thinking but couldn’t find the right object.
