diff --git a/changelogs/fragments/44428-inventory-plugin-list.yml b/changelogs/fragments/44428-inventory-plugin-list.yml new file mode 100644 index 00000000000..9b2db695f8a --- /dev/null +++ b/changelogs/fragments/44428-inventory-plugin-list.yml @@ -0,0 +1,3 @@ +minor_changes: + - "default value for ``INVENTORY_ENABLED`` option was ``['host_list', 'script', 'yaml', 'ini', 'toml', 'auto']`` + and is now ``['host_list', 'script', 'auto', 'yaml', 'ini', 'toml']``" diff --git a/docs/docsite/rst/plugins/inventory.rst b/docs/docsite/rst/plugins/inventory.rst index 5b69686c511..af6fbf8da41 100644 --- a/docs/docsite/rst/plugins/inventory.rst +++ b/docs/docsite/rst/plugins/inventory.rst @@ -22,7 +22,7 @@ config file that ships with Ansible: .. code-block:: ini [inventory] - enable_plugins = host_list, script, auto, yaml, ini + enable_plugins = host_list, script, auto, yaml, ini, toml This list also establishes the order in which each plugin tries to parse an inventory source. Any plugins left out of the list will not be considered, so you can 'optimize' your inventory loading by minimizing it to what you actually use. For example: diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.8.rst b/docs/docsite/rst/porting_guides/porting_guide_2.8.rst index 79fe5d387dd..af622c1e8b4 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.8.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.8.rst @@ -139,6 +139,8 @@ Plugins has changed to ``%USERPROFILE%\.ansible_async``. To control this path now, either set the ``ansible_async_dir`` variable or the ``async_dir`` value in the ``powershell`` section of the config ini. +* Order of enabled inventory plugins (:ref:`INVENTORY_ENABLED`) has been updated, :ref:`auto ` is now before :ref:`yaml ` and :ref:`ini `. + Porting custom scripts ====================== diff --git a/examples/ansible.cfg b/examples/ansible.cfg index a93ee3e8e56..b41fbe01140 100644 --- a/examples/ansible.cfg +++ b/examples/ansible.cfg @@ -324,7 +324,7 @@ #any_errors_fatal = False [inventory] -# enable inventory plugins, default: 'host_list', 'script', 'auto', 'yaml', 'ini' +# enable inventory plugins, default: 'host_list', 'script', 'auto', 'yaml', 'ini', 'toml' #enable_plugins = host_list, virtualbox, yaml, constructed # ignore these extensions when parsing a directory as inventory source diff --git a/lib/ansible/plugins/inventory/auto.py b/lib/ansible/plugins/inventory/auto.py index f444acee901..7a975918009 100644 --- a/lib/ansible/plugins/inventory/auto.py +++ b/lib/ansible/plugins/inventory/auto.py @@ -11,7 +11,7 @@ DOCUMENTATION = ''' - Matt Davis <@nitzmahone> short_description: Loads and executes an inventory plugin specified in a YAML config description: - - By whitelisting C(auto) as the final inventory plugin, any YAML inventory config file with a + - By whitelisting C(auto) inventory plugin, any YAML inventory config file with a C(plugin) key at its root will automatically cause the named plugin to be loaded and executed with that config. This effectively provides automatic whitelisting of all installed/accessible inventory plugins. - To disable this behavior, remove C(auto) from the C(INVENTORY_ENABLED) config element.