summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Tamsky <tamsky@users.noreply.github.com>2015-07-09 23:33:31 -1000
committerMarc Tamsky <tamsky@users.noreply.github.com>2015-07-09 23:33:31 -1000
commitaaf59319e4ab035d9b25ba35e811eaaed3acceb2 (patch)
tree80c0b775a4fa5edc7d3a2bc9aa79910303023094
parent4cac10e016f93ce1f861d36802316e15d2192f1b (diff)
downloadansible-aaf59319e4ab035d9b25ba35e811eaaed3acceb2.tar.gz
document jsonfile and provide example config
-rw-r--r--docsite/rst/playbooks_variables.rst21
1 files changed, 17 insertions, 4 deletions
diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst
index b0e2e223cd..ba341398fe 100644
--- a/docsite/rst/playbooks_variables.rst
+++ b/docsite/rst/playbooks_variables.rst
@@ -494,7 +494,11 @@ not be necessary to "hit" all servers to reference variables and information abo
With fact caching enabled, it is possible for machine in one group to reference variables about machines in the other group, despite
the fact that they have not been communicated with in the current execution of /usr/bin/ansible-playbook.
-To configure fact caching, enable it in ansible.cfg as follows::
+To benefit from cached facts, you will want to change the 'gathering' setting to 'smart' or 'explicit' or set 'gather_facts' to False in most plays.
+
+Currently, Ansible ships with two persistent cache plugins: redis and jsonfile.
+
+To configure fact caching using redis, enable it in ansible.cfg as follows::
[defaults]
gathering = smart
@@ -502,9 +506,6 @@ To configure fact caching, enable it in ansible.cfg as follows::
fact_caching_timeout = 86400
# seconds
-You might also want to change the 'gathering' setting to 'smart' or 'explicit' or set gather_facts to False in most plays.
-
-At the time of writing, Redis is the only supported fact caching engine.
To get redis up and running, perform the equivalent OS commands::
yum install redis
@@ -515,6 +516,18 @@ Note that the Python redis library should be installed from pip, the version pac
In current embodiments, this feature is in beta-level state and the Redis plugin does not support port or password configuration, this is expected to change in the near future.
+To configure fact caching using jsonfile, enable it in ansible.cfg as follows::
+
+ [defaults]
+ gathering = smart
+ fact_caching = jsonfile
+ fact_caching_location = /path/to/cachedir
+ fact_caching_timeout = 86400
+ # seconds
+
+`fact_caching_location` is a local filesystem path to a writeable
+directory (ansible will attempt to create the directory if one does not exist).
+
.. _registered_variables:
Registered Variables