Skip to content

Commit

Permalink
inventory plugin order: update doc
Browse files Browse the repository at this point in the history
add doc for ansible#44428:
- add changelog fragment
- update porting guide
also:
- update auto inventory plugin doc
- mention toml plugin in examples
  • Loading branch information
pilou- authored and abadger committed Dec 12, 2018
1 parent 2f8001a commit 7e278b2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/44428-inventory-plugin-list.yml
Original file line number Diff line number Diff line change
@@ -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']``"
2 changes: 1 addition & 1 deletion docs/docsite/rst/plugins/inventory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 2 additions & 0 deletions docs/docsite/rst/porting_guides/porting_guide_2.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <auto_inventory>` is now before :ref:`yaml <yaml_inventory>` and :ref:`ini <ini_inventory>`.

Porting custom scripts
======================

Expand Down
2 changes: 1 addition & 1 deletion examples/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/plugins/inventory/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- 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.
Expand Down

0 comments on commit 7e278b2

Please sign in to comment.