Documentation for inventory ignored extensions

This commit is contained in:
Quentin Stafford-Fraser 2015-07-21 19:25:00 +01:00
parent 2bc9004618
commit 7a3519bbaa

View file

@ -218,13 +218,21 @@ to include it in the project.
.. _using_multiple_sources:
Using Multiple Inventory Sources
````````````````````````````````
Using Inventory Directories and Multiple Inventory Sources
``````````````````````````````````````````````````````````
If the location given to -i in Ansible is a directory (or as so configured in ansible.cfg), Ansible can use multiple inventory sources
at the same time. When doing so, it is possible to mix both dynamic and statically managed inventory sources in the same ansible run. Instant
hybrid cloud!
In an inventory directory, executable files will be treated as dynamic inventory sources and most other files as static sources. Files which end with any of the following will be ignored::
~, .orig, .bak, .ini, .retry, .pyc, .pyo
You can replace this list with your own selection by configuring an ``inventory_ignore_extensions`` list in ansible.cfg, or setting the ANSIBLE_INVENTORY_IGNORE environment variable. The value in either case should be a comma-separated list of patterns, as shown above.
Any ``group_vars`` and ``host_vars`` subdirectories in and inventory directory will be interpreted as expected, making inventory directories a powerful way to organize different sets of configurations.
.. _static_groups_of_dynamic:
Static Groups of Dynamic Groups