# YAML inventory files: something real or a confusion

**URL:** <https://forum.ansible.com/t/yaml-inventory-files-something-real-or-a-confusion/23290>\
**Category:** Ansible Project\
**Created:** [December 20, 2016, 3:27am UTC](https://forum.ansible.com/t/yaml-inventory-files-something-real-or-a-confusion/23290 "2016-12-20T03:27:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stuart\_Watt](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Stuart\_Watt](https://forum.ansible.com/u/Stuart_Watt)\
**Post date:** [December 20, 2016, 3:27am UTC](https://forum.ansible.com/t/yaml-inventory-files-something-real-or-a-confusion/23290/1 "2016-12-20T03:27:11Z")

</div>

Hi all

I’m slightly confused, under the Alternative Directory Layout in [http://docs.ansible.com/ansible/playbooks\_best\_practices.html](http://docs.ansible.com/ansible/playbooks_best_practices.html), all the examples shown use a “hosts.yml” which implies a YAML format inventory. There seems to be code for this, but it’s not clear if it’s just never used and not documented or long gone.

Should maybe this section just refer to “hosts” as an INI file? Or are YAML formatted inventories a thing which really exists and might be useful, and if so, does anybody have an example?

All the best  
Stuart

---

<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:** [December 22, 2016, 5:33pm UTC](https://forum.ansible.com/t/yaml-inventory-files-something-real-or-a-confusion/23290/2 "2016-12-22T17:33:06Z")

</div>

YAML inventory was reintroduced in 2.1, but in any case I removed the .yml to leave unspecified as the format of the file should not matter for that example.
