ansible/docs/docsite/rst/plugins/vars.rst
Alicia Cozine 4b52a54e18 Reduce warnings (#39254)
* removes FAQ links; no entries exist for linked config settings

* fixes various anchors and links

* addresses abadger comments, thanks

* marks orphan pages, avoids TOC errors

* adds links for remote_tmp setting to FAQ
2018-04-25 11:18:52 -07:00

1.8 KiB

Topics

Vars Plugins

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.

Vars plugins were partially implemented in Ansible 2.0 and rewritten to be fully implemented starting with Ansible 2.4.

The host_group_vars <host_group_vars_vars> plugin shipped with Ansible enables reading variables from host_variables and group_variables.

Enabling Vars Plugins

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 ansible.cfg <ansible_configuration_settings>.

Using Vars Plugins

Vars plugins are used automatically after they are enabled.

Plugin Lists

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.

maxdepth

1

vars/*

action

Ansible Action plugins

cache

Ansible Cache plugins

callback

Ansible callback plugins

connection

Ansible connection plugins

inventory

Ansible inventory plugins

shell

Ansible Shell plugins

strategy

Ansible Strategy plugins

User Mailing List

Have a question? Stop by the google group!

irc.freenode.net

#ansible IRC chat channel