# Documenting inventory directories

**URL:** <https://forum.ansible.com/t/documenting-inventory-directories/16069>\
**Category:** Ansible Project\
**Created:** [August 29, 2014, 11:18am UTC](https://forum.ansible.com/t/documenting-inventory-directories/16069 "2014-08-29T11:18:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quentin\_Stafford-Fra](https://avatars.discourse-cdn.com/v4/letter/q/b2d939/32.png) [@Quentin\_Stafford-Fra](https://forum.ansible.com/u/Quentin_Stafford-Fra)\
**Post date:** [August 29, 2014, 11:18am UTC](https://forum.ansible.com/t/documenting-inventory-directories/16069/1 "2014-08-29T11:18:40Z")

</div>

I love the ‘inventory directory’ feature, and typically have directories called, e.g:

- inventory/staging/
- inventory/live/
- inventory/docker/
- inventory/local/

but I would sometimes like to document in each one how to use them, and what they do.

At present, if you specify a directory as the inventory, it will load any regular files within it as inventory files and execute any scripts as inventory scripts.

It ignores any files that match

“~”, “.orig”, “.bak”, “.ini”, “.retry”, “.pyc”, “.pyo”

Can I propose that a few extras be added to that list, perhaps:

“_.txt", "_.doc”, “\*.md”

so you can put a README.txt in the directory without it being interpreted as an inventory?

Other alternatives:

- You could require things that were actually inventory files to have a particular naming structure
- You could have a .exclude file which listed files to be ignored

At present, my workaround is to put a README.txt in each one but to begin every line with a ‘#’. It is then read as an inventory file but ignored!

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [August 29, 2014, 11:43am UTC](https://forum.ansible.com/t/documenting-inventory-directories/16069/2 "2014-08-29T11:43:37Z")

</div>

I’m definitely ok with this.

Is this something you’d like to work on?

Should be a very small patch.

---

<div class="post-metadata">

**Author:** ![Quentin\_Stafford-Fra](https://avatars.discourse-cdn.com/v4/letter/q/b2d939/32.png) [@Quentin\_Stafford-Fra](https://forum.ansible.com/u/Quentin_Stafford-Fra)\
**Post date:** [August 31, 2014, 1:26pm UTC](https://forum.ansible.com/t/documenting-inventory-directories/16069/3 "2014-08-31T13:26:10Z")

</div>

Michael -

A pull request will be coming your way shortly.

I’ve excluded README\* files by default, and also allowed a directory to include an ‘.inventoryignore’ file (analagous to .gitignore) which lists patterns of files to be ignored in place of the defaults.

All the best,  
Quentin
