# not able to echo value of hostvars in another host

**URL:** <https://forum.ansible.com/t/not-able-to-echo-value-of-hostvars-in-another-host/30905>\
**Category:** Ansible Project\
**Created:** [July 30, 2019, 2:12pm UTC](https://forum.ansible.com/t/not-able-to-echo-value-of-hostvars-in-another-host/30905 "2019-07-30T14:12:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kunalsing\_Thakur](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@Kunalsing\_Thakur](https://forum.ansible.com/u/Kunalsing_Thakur)\
**Post date:** [July 30, 2019, 2:12pm UTC](https://forum.ansible.com/t/not-able-to-echo-value-of-hostvars-in-another-host/30905/1 "2019-07-30T14:12:54Z")

</div>



---

<div class="post-metadata">

**Author:** ![Kunalsing\_Thakur](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@Kunalsing\_Thakur](https://forum.ansible.com/u/Kunalsing_Thakur)\
**Post date:** [July 30, 2019, 2:15pm UTC](https://forum.ansible.com/t/not-able-to-echo-value-of-hostvars-in-another-host/30905/2 "2019-07-30T14:15:11Z")

</div>

The following Result:-

TASK [debug] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /etc/ansible/playbooks/test.yaml:59  
ok: [127.0.0.1] =\> {  
“hostvars[groups[‘msliv’][0]][‘downgraderpmversion’][‘stdout’]”: “5.42.0-201809042105.733e1aa”  
}

TASK [shell] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /etc/ansible/playbooks/test.yaml:61  
changed: [127.0.0.1] =\> {“changed”: true, “cmd”: “echo hostvars[groups[‘msliv’][0]][‘downgraderpmversion’][‘stdout’]”, “delta”: “0:00:01.219563”, “end”: “2019-07-30 14:14:25.187306”, “rc”: 0, “start”: “2019-07-30 14:14:23.967743”, “stderr”: “”, “stderr\_lines”: , “stdout”: “hostvars[groups[msliv][0]][downgraderpmversion][stdout]”, “stdout\_lines”: [“hostvars[groups[msliv][0]][downgraderpmversion][stdout]”]}

---

<div class="post-metadata">

**Author:** ![Kunalsing\_Thakur](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@Kunalsing\_Thakur](https://forum.ansible.com/u/Kunalsing_Thakur)\
**Post date:** [July 31, 2019, 4:28am UTC](https://forum.ansible.com/t/not-able-to-echo-value-of-hostvars-in-another-host/30905/3 "2019-07-31T04:28:59Z")

</div>

Guies Anyone help one this.
