2018-11-29 20:03:00 +00:00
.. _vars_plugins:
2017-09-23 03:19:50 +00:00
Vars Plugins
2018-11-29 20:03:00 +00:00
============
.. contents ::
:local:
:depth: 2
2017-09-23 03:19:50 +00:00
2017-09-25 22:37:33 +00:00
Vars plugins inject additional variable data into Ansible runs that did not come from an inventory source, playbook, or command line. Playbook constructs like 'host_vars' and 'group_vars' work using vars plugins.
2018-02-13 20:05:11 +00:00
Vars plugins were partially implemented in Ansible 2.0 and rewritten to be fully implemented starting with Ansible 2.4.
2017-09-25 22:37:33 +00:00
2018-04-25 18:18:52 +00:00
The :ref: `host_group_vars <host_group_vars_vars>` plugin shipped with Ansible enables reading variables from :ref: `host_variables` and :ref: `group_variables` .
2017-09-23 03:19:50 +00:00
2017-10-11 04:15:25 +00:00
.. _enable_vars:
2018-11-29 20:03:00 +00:00
Enabling vars plugins
---------------------
2017-09-23 03:19:50 +00:00
2018-04-25 18:18:52 +00:00
You can activate a custom vars plugin by either dropping it into a `` vars_plugins `` directory adjacent to your play, inside a role, or by putting it in one of the directory sources configured in :ref: `ansible.cfg <ansible_configuration_settings>` .
2017-09-23 03:19:50 +00:00
2017-10-11 04:15:25 +00:00
.. _using_vars:
2018-11-29 20:03:00 +00:00
Using vars plugins
------------------
2017-10-11 04:15:25 +00:00
Vars plugins are used automatically after they are enabled.
.. _vars_plugin_list:
2017-09-23 03:19:50 +00:00
Plugin Lists
2018-11-29 20:03:00 +00:00
------------
2017-09-23 03:19:50 +00:00
2018-11-29 20:03:00 +00:00
You can use `` ansible-doc -t vars -l `` to see the list of available plugins.
2017-09-25 22:37:33 +00:00
Use `` ansible-doc -t vars <plugin name> `` to see specific plugin-specific documentation and examples.
2017-09-23 03:19:50 +00:00
.. toctree :: :maxdepth: 1
:glob:
vars/*
.. seealso ::
2018-11-29 20:03:00 +00:00
:ref: `action_plugins`
2017-09-23 03:19:50 +00:00
Ansible Action plugins
2018-11-29 20:03:00 +00:00
:ref: `cache_plugins`
2017-09-23 03:19:50 +00:00
Ansible Cache plugins
2018-11-29 20:03:00 +00:00
:ref: `callback_plugins`
2017-09-23 03:19:50 +00:00
Ansible callback plugins
2018-11-29 20:03:00 +00:00
:ref: `connection_plugins`
2017-09-23 03:19:50 +00:00
Ansible connection plugins
2018-11-29 20:03:00 +00:00
:ref: `inventory_plugins`
2017-09-23 03:19:50 +00:00
Ansible inventory plugins
2018-11-29 20:03:00 +00:00
:ref: `shell_plugins`
2017-09-23 03:19:50 +00:00
Ansible Shell plugins
2018-11-29 20:03:00 +00:00
:ref: `strategy_plugins`
2017-09-23 03:19:50 +00:00
Ansible Strategy plugins
2018-07-21 13:48:47 +00:00
`User Mailing List <https://groups.google.com/group/ansible-devel> `_
2017-09-23 03:19:50 +00:00
Have a question? Stop by the google group!
`irc.freenode.net <http://irc.freenode.net> `_
#ansible IRC chat channel