Skip to content

Commit

Permalink
Add 'auto' to documented default enabled inventory plugins (ansible#4…
Browse files Browse the repository at this point in the history
…6621)

* Correct default inventory plugins enabled in docs and example/ansible.cfg

* Fix headers
  • Loading branch information
s-hertel authored and acozine committed Oct 8, 2018
1 parent 753711c commit 43d12c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions docs/docsite/rst/plugins/inventory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
.. _inventory_plugins:

Inventory Plugins
-----------------
=================

Inventory plugins allow users to point at data sources to compile the inventory of hosts that Ansible uses to target tasks, either via the ``-i /path/to/file`` and/or ``-i 'host1, host2'`` command line parameters or from other configuration sources.


.. _enabling_inventory:

Enabling Inventory Plugins
++++++++++++++++++++++++++
--------------------------

Most inventory plugins shipped with Ansible are disabled by default and need to be whitelisted in your
:ref:`ansible.cfg <ansible_configuration_settings>` file in order to function. This is how the default whitelist looks in the
Expand All @@ -20,7 +20,7 @@ config file that ships with Ansible:
.. code-block:: ini
[inventory]
enable_plugins = host_list, script, yaml, ini
enable_plugins = host_list, script, yaml, ini, auto
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 All @@ -33,7 +33,7 @@ This list also establishes the order in which each plugin tries to parse an inve
.. _using_inventory:

Using Inventory Plugins
+++++++++++++++++++++++
-----------------------

The only requirement for using an inventory plugin after it is enabled is to provide an inventory source to parse.
Ansible will try to use the list of enabled inventory plugins, in order, against each inventory source provided.
Expand Down Expand Up @@ -107,7 +107,7 @@ If a host does not have the variables in the configuration above (i.e. ``tags.Na
.. _inventory_plugin_list:

Plugin List
+++++++++++
-----------

You can use ``ansible-doc -t inventory -l`` to see the list of available plugins.
Use ``ansible-doc -t inventory <plugin name>`` to see plugin-specific documentation and examples.
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', 'yaml', 'ini'
# enable inventory plugins, default: 'host_list', 'script', 'yaml', 'ini', 'auto'
#enable_plugins = host_list, virtualbox, yaml, constructed

# ignore these extensions when parsing a directory as inventory source
Expand Down

0 comments on commit 43d12c1

Please sign in to comment.