b233f3f296
* updated docs - for devs: - added inventory/vars section - made some updates to general section and other plugin types - for users: - added 'user' plugin section to start describing the plugins - docs on types, what they are and how to use - removed ref to deleted AUTHORS file - corrected several typos/headers - added descriptions to config.rst template - ignore generated files for cli/plugins and config - remove new generated files on `make clean` - moved details from devguid and intro doc to plugin specific pages - pretied up lookup notes - changed precedence ref to not conflict config - removed duplicate config data, as config is autogenerated and up to date - put new plugins under playbooks - added `pass` cause rst/python dislikes fractions - removed dupe in .gitignore, alpha sorted to avoid moar dupes - added try cause rst/python freaks out * generate plugins into their own dir only do plugins that support docs use toctree from main plugins page
62 lines
1.9 KiB
ReStructuredText
62 lines
1.9 KiB
ReStructuredText
.. contents:: Topics
|
|
|
|
|
|
Inventory Plugins
|
|
-----------------
|
|
|
|
Inventory plugins allow users to point at data sources to compile the inventory of hosts that Ansible uses to target it's tasks.
|
|
They control what happens when with ``-i /path/to/file`` and/or ``-i 'host1, host2`` when passed into Ansible (or from other configuration sources).
|
|
|
|
.. _enabling_inventory_plugins:
|
|
|
|
Enabling Inventory Plugins
|
|
++++++++++++++++++++++++++
|
|
|
|
Most inventory plugins shipped with Ansible are disabled by default and need to be whitelisted in your
|
|
:doc:`ansible.cfg <../config>` file in order to function. For example, this is how the default looks like:
|
|
|
|
.. code-block:: ini
|
|
|
|
[inventory]
|
|
enable_plugins = host_list, script, yaml, ini
|
|
|
|
This list also establishes the order in which each plugin tries to parse an inventory source (in the case 2 plugins can use the same 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:
|
|
|
|
.. code-block:: ini
|
|
|
|
[inventory]
|
|
enable_plugins = advanced_host_list, constructed, yaml
|
|
|
|
|
|
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 specific documents and examples.
|
|
|
|
.. toctree:: :maxdepth: 1
|
|
:glob:
|
|
|
|
inventory/*
|
|
|
|
.. seealso::
|
|
|
|
:doc:`../playbooks`
|
|
An introduction to playbooks
|
|
:doc:`callback`
|
|
Ansible callback plugins
|
|
:doc:`connection`
|
|
Ansible connection plugins
|
|
:doc:`../playbooks_filters`
|
|
Jinja2 filter plugins
|
|
:doc:`../playbooks_tests`
|
|
Jinja2 test plugins
|
|
:doc:`../playbooks_lookups`
|
|
Jinja2 lookup plugins
|
|
:doc:`vars`
|
|
Ansible vars plugins
|
|
`User Mailing List <http://groups.google.com/group/ansible-devel>`_
|
|
Have a question? Stop by the google group!
|
|
`irc.freenode.net <http://irc.freenode.net>`_
|
|
#ansible IRC chat channel
|