summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrian Coca <bcoca@users.noreply.github.com>2024-09-26 21:15:34 +0200
committerGitHub <noreply@github.com>2024-09-26 21:15:34 +0200
commit3d40db1ac07ae65cdae0a72e746308f8d2b34bc1 (patch)
treeb4902dad5f088449b97531ff97d1ad89fac52409 /lib
parentfacts: Skip path if the distribution path is directory (#84012) (diff)
downloadansible-3d40db1ac07ae65cdae0a72e746308f8d2b34bc1.tar.xz
ansible-3d40db1ac07ae65cdae0a72e746308f8d2b34bc1.zip
INVENTORY_IGNORE_EXTS stop ignoring ini (#84001)
* INVENTORY_IGNORE_EXTS stop ignoring ini Originally added to avoid configuration files for inventory scripts now clashes with the much more common ini inventory files. * add a note to script plugin * Update lib/ansible/plugins/inventory/script.py Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/config/base.yml2
-rw-r--r--lib/ansible/plugins/inventory/script.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/ansible/config/base.yml b/lib/ansible/config/base.yml
index 445fd4540a..ed7007b3d1 100644
--- a/lib/ansible/config/base.yml
+++ b/lib/ansible/config/base.yml
@@ -1719,7 +1719,7 @@ INVENTORY_EXPORT:
type: bool
INVENTORY_IGNORE_EXTS:
name: Inventory ignore extensions
- default: "{{(REJECT_EXTS + ('.orig', '.ini', '.cfg', '.retry'))}}"
+ default: "{{(REJECT_EXTS + ('.orig', '.cfg', '.retry'))}}"
description: List of extensions to ignore when using a directory as an inventory source.
env: [{name: ANSIBLE_INVENTORY_IGNORE}]
ini:
diff --git a/lib/ansible/plugins/inventory/script.py b/lib/ansible/plugins/inventory/script.py
index 9b4c316ebd..c40f39c73e 100644
--- a/lib/ansible/plugins/inventory/script.py
+++ b/lib/ansible/plugins/inventory/script.py
@@ -29,6 +29,8 @@ DOCUMENTATION = '''
- The plugin does not cache results because external inventory scripts are responsible for their own caching.
- To write your own inventory script see (R(Developing dynamic inventory,developing_inventory) from the documentation site.
- To find the scripts that used to be part of the code release, go to U(https://github.com/ansible-community/contrib-scripts/).
+ - Since 2.19 using a directory as an inventory source will no longer ignore .ini files by default,
+ but you can still update the configuration to do so.
'''
EXAMPLES = r'''# fmt: code