2017-09-23 03:19:50 +00:00
.. contents :: Topics
Cache Plugins
-------------
2017-09-25 22:37:33 +00:00
Cache plugin implement a backend caching mechanism that allows Ansible to store gathered facts or inventory source data
without the performance hit of retrieving them from source.
2017-09-23 03:19:50 +00:00
2017-09-25 22:37:33 +00:00
The default cache plugin is the :doc: `memory <cache/memory>` plugin, which only caches the data for the current execution of Ansible. Other plugins with persistent storage are available to allow caching the data across runs.
2017-09-23 03:19:50 +00:00
Enabling Cache Plugins
++++++++++++++++++++++
Only one cache plugin can be active at a time.
2017-09-25 22:37:33 +00:00
You can enable a cache plugin in the Ansible configuration, either via environment variable:
2017-09-23 03:19:50 +00:00
.. code-block :: shell
export ANSIBLE_CACHE_PLUGIN=jsonfile
or in the `` ansible.cfg `` file:
.. code-block :: ini
[defaults]
fact_caching=redis
2017-09-25 22:37:33 +00:00
You will also need to configure other settings specific to each plugin. Consult the individual plugin documentation
or the Ansible :doc: `configuration <../config>` for more details.
2017-09-23 03:19:50 +00:00
Plugin List
+++++++++++
2017-09-25 22:37:33 +00:00
You can use `` ansible-doc -t cache -l `` to see the list of available plugins.
Use `` ansible-doc -t cache <plugin name> `` to see specific documentation and examples.
2017-09-23 03:19:50 +00:00
.. toctree :: :maxdepth: 1
:glob:
cache/*
.. seealso ::
:doc: `action`
Ansible Action 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
: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