# How to get a hold of the hostname from inventory file?

**URL:** <https://forum.ansible.com/t/how-to-get-a-hold-of-the-hostname-from-inventory-file/16464>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [October 8, 2014, 1:59pm UTC](https://forum.ansible.com/t/how-to-get-a-hold-of-the-hostname-from-inventory-file/16464 "2014-10-08T13:59:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [October 8, 2014, 1:59pm UTC](https://forum.ansible.com/t/how-to-get-a-hold-of-the-hostname-from-inventory-file/16464/1 "2014-10-08T13:59:42Z")

</div>

that would be the special var inventory\_hostname
