From 7a3519bbaa7da3166504505638d1270bd675e7f1 Mon Sep 17 00:00:00 2001 From: Quentin Stafford-Fraser Date: Tue, 21 Jul 2015 19:25:00 +0100 Subject: [PATCH 1/2] Documentation for inventory ignored extensions --- docsite/rst/intro_dynamic_inventory.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docsite/rst/intro_dynamic_inventory.rst b/docsite/rst/intro_dynamic_inventory.rst index 5b634d86cd..0de7abb80f 100644 --- a/docsite/rst/intro_dynamic_inventory.rst +++ b/docsite/rst/intro_dynamic_inventory.rst @@ -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 From dfd19d6bd8141447135480ac05df25d765e95772 Mon Sep 17 00:00:00 2001 From: Quentin Stafford-Fraser Date: Tue, 21 Jul 2015 19:38:49 +0100 Subject: [PATCH 2/2] Fix typo in docs --- docsite/rst/intro_dynamic_inventory.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docsite/rst/intro_dynamic_inventory.rst b/docsite/rst/intro_dynamic_inventory.rst index 0de7abb80f..729a6ba517 100644 --- a/docsite/rst/intro_dynamic_inventory.rst +++ b/docsite/rst/intro_dynamic_inventory.rst @@ -231,7 +231,7 @@ In an inventory directory, executable files will be treated as dynamic inventory 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. +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: