1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #11642 from quentinsf/inventory_ignores

Mention inventory_ignore_extensions in the dynamic inventory documentation
This commit is contained in:
Abhijit Menon-Sen 2016-03-17 10:11:07 +05:30
commit cc7867d1de

View file

@ -303,13 +303,21 @@ to include it in the project.
.. _using_multiple_sources: .. _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 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 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! 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 an 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:
Static Groups of Dynamic Groups Static Groups of Dynamic Groups