# Using Host Variables in Task

**URL:** <https://forum.ansible.com/t/using-host-variables-in-task/13867>\
**Category:** Ansible Project\
**Created:** [November 8, 2013, 4:02am UTC](https://forum.ansible.com/t/using-host-variables-in-task/13867 "2013-11-08T04:02:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amree](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@amree](https://forum.ansible.com/u/amree)\
**Post date:** [November 8, 2013, 4:02am UTC](https://forum.ansible.com/t/using-host-variables-in-task/13867/1 "2013-11-08T04:02:27Z")

</div>

For e.g, I have these hosts in my inventory:

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [November 10, 2013, 9:37pm UTC](https://forum.ansible.com/t/using-host-variables-in-task/13867/2 "2013-11-10T21:37:25Z")

</div>

Since you named the variable name, it is just

{{ name }}
