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>
pull/84015/head
Brian Coca 1 year ago committed by GitHub
parent 34f8f55d9e
commit 3d40db1ac0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,2 @@
minor_changes:
- INVENTORY_IGNORE_EXTS config, removed ``ini`` from the default list, inventory scripts using a corresponding .ini configuration are rare now and inventory.ini files are more common. Those that need to ignore the ini files for inventory scripts can still add it to configuration.

@ -1719,7 +1719,7 @@ INVENTORY_EXPORT:
type: bool type: bool
INVENTORY_IGNORE_EXTS: INVENTORY_IGNORE_EXTS:
name: Inventory ignore extensions 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. description: List of extensions to ignore when using a directory as an inventory source.
env: [{name: ANSIBLE_INVENTORY_IGNORE}] env: [{name: ANSIBLE_INVENTORY_IGNORE}]
ini: ini:

@ -29,6 +29,8 @@ DOCUMENTATION = '''
- The plugin does not cache results because external inventory scripts are responsible for their own caching. - 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 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/). - 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 EXAMPLES = r'''# fmt: code

Loading…
Cancel
Save