# Pulling information from a registered variable

**URL:** <https://forum.ansible.com/t/pulling-information-from-a-registered-variable/32620>\
**Category:** Ansible Project\
**Created:** [April 7, 2020, 1:40pm UTC](https://forum.ansible.com/t/pulling-information-from-a-registered-variable/32620 "2020-04-07T13:40:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jamal\_Gardiner](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@Jamal\_Gardiner](https://forum.ansible.com/u/Jamal_Gardiner)\
**Post date:** [April 7, 2020, 1:40pm UTC](https://forum.ansible.com/t/pulling-information-from-a-registered-variable/32620/1 "2020-04-07T13:40:40Z")

</div>

Hey guys.

I’m trying to pull information from this variable that was registered. My question is how would I go about adding conditionals here so that if one item like, 10.200.98.11 has 2 or more msg it’d return a string.

 ![digbomb.jpg](https://us1.discourse-cdn.com/ansible/original/2X/c/cc63aa8014ce981a831da8598f83e8c96c66e873.jpeg)

---

<div class="post-metadata">

**Author:** ![JDM](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@JDM](https://forum.ansible.com/u/JDM)\
**Post date:** [April 7, 2020, 2:47pm UTC](https://forum.ansible.com/t/pulling-information-from-a-registered-variable/32620/2 "2020-04-07T14:47:32Z")

</div>

- debug:  
msg: “{{ digbomb.results.msg.target }}”

This will list all targets. If you want to use one at a time then you can loop it

> **(attachments)**
>
> ![digbomb.jpg](https://us1.discourse-cdn.com/ansible/original/2X/c/cc63aa8014ce981a831da8598f83e8c96c66e873.jpeg)
