2017-09-23 05:19:50 +02:00
.. contents :: Topics
Vars Plugins
------------
2017-09-26 00:37:33 +02: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 21:05:11 +01:00
Vars plugins were partially implemented in Ansible 2.0 and rewritten to be fully implemented starting with Ansible 2.4.
2017-09-26 00:37:33 +02:00
The :doc: `host_group_vars <vars/host_group_vars>` plugin shipped with Ansible enables reading variables from :ref: `host_vars` and :ref: `group_vars` .
2017-09-23 05:19:50 +02:00
2017-10-11 06:15:25 +02:00
.. _enable_vars:
2017-09-23 05:19:50 +02:00
Enabling Vars Plugins
+++++++++++++++++++++
2018-04-20 02:02:30 +02:00
You can activate a custom vars plugins 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 05:19:50 +02:00
2017-10-11 06:15:25 +02:00
.. _using_vars:
Using Vars Plugins
++++++++++++++++++
Vars plugins are used automatically after they are enabled.
.. _vars_plugin_list:
2017-09-23 05:19:50 +02:00
Plugin Lists
++++++++++++
2017-09-26 00:37:33 +02:00
You can use `` ansible-doc -t vars -l `` to see the list of available plugins.
Use `` ansible-doc -t vars <plugin name> `` to see specific plugin-specific documentation and examples.
2017-09-23 05:19:50 +02:00
.. toctree :: :maxdepth: 1
:glob:
vars/*
.. seealso ::
:doc: `action`
Ansible Action plugins
:doc: `cache`
Ansible Cache plugins
:doc: `callback`
Ansible callback plugins
:doc: `connection`
Ansible connection plugins
:doc: `inventory`
Ansible inventory plugins
:doc: `shell`
Ansible Shell plugins
:doc: `strategy`
Ansible Strategy 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