From ce0dd684314ce3d753db65fa31f4e51bb0c8ad19 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Mon, 8 Feb 2016 20:43:21 -0600 Subject: [PATCH] Docs: Fact caching This patch adds docs about how to disable fact caching and clear existing cached facts. Closes-bug: 1500642 Change-Id: I77afab5ce227e549f4489db2a070b75e619ec3a7 --- .../ops-troubleshooting-ansiblecachedfacts.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/source/install-guide/ops-troubleshooting-ansiblecachedfacts.rst b/doc/source/install-guide/ops-troubleshooting-ansiblecachedfacts.rst index 704a425c9a..bdefcd4a67 100644 --- a/doc/source/install-guide/ops-troubleshooting-ansiblecachedfacts.rst +++ b/doc/source/install-guide/ops-troubleshooting-ansiblecachedfacts.rst @@ -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