Docs: Fact caching

This patch adds docs about how to disable fact caching and clear
existing cached facts.

Closes-bug: 1500642

Change-Id: I77afab5ce227e549f4489db2a070b75e619ec3a7
This commit is contained in:
Major Hayden
2016-02-08 20:43:21 -06:00
parent 5c93accc8b
commit ce0dd68431

View File

@@ -8,11 +8,14 @@ Linux distribution, kernel version, and network interfaces, is gathered. To
improve performance, particularly in larger deployments, these facts can be
cached.
OpenStack-Ansible enables fact caching by default.
OpenStack-Ansible enables fact caching by default. The facts are cached in
JSON files within ``/etc/openstack_deploy/ansible_facts``.
`Fact Caching`_ can be disabled or reconfigured through options in ``ansible.cfg``.
Fact caching can be disabled by commenting out the ``fact_caching``
parameter in ``playbooks/ansible.cfg``. Refer to Ansible's documentation on
`fact caching`_ for more details.
.. _Fact Caching: http://docs.ansible.com/ansible/playbooks_variables.html#fact-caching
.. _fact caching: http://docs.ansible.com/ansible/playbooks_variables.html#fact-caching
Forcing regeneration of cached facts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -22,7 +25,7 @@ created on the host, its cached facts may be incorrect. This can lead to
unexpected errors while running playbooks, and require that the cached facts be
regenerated.
Run the following command to remove currently cached facts:
Run the following command to remove all currently cached facts for all hosts:
.. code-block:: shell-session
@@ -30,6 +33,11 @@ Run the following command to remove currently cached facts:
New facts will be gathered and cached during the next playbook run.
To clear facts for a single host, find its file within
``/etc/openstack_deploy/ansible_facts/`` and remove it. Each host has a JSON
file that is named after its hostname. The facts for that host will be
regenerated on the next playbook run.
--------------
.. include:: navigation.txt