Configurable fact path (#18147)

* Make fact_path configurable

* Add docs for fact_path

* Add tests for localfacts

* Default fact gathering settings in PlayContext
This commit is contained in:
Alvaro Aleman
2017-01-12 16:49:04 +01:00
committed by Brian Coca
parent f078946ed3
commit 1b2ad94496
8 changed files with 73 additions and 3 deletions

View File

@@ -387,6 +387,17 @@ is very very conservative::
forks = 5
.. _fact_path:
fact_path
=========
This option allows you to globally configure a custom path for :ref:`_local_facts`::
fact_path = /home/centos/ansible_facts.d
The default is to use the default from the `setup module <https://docs.ansible.com/ansible/setup_module.html>`_: ``/etc/ansible/facts.d``
.. _gathering:
gathering

View File

@@ -454,6 +454,7 @@ For instance, what if you want users to be able to control some aspect about how
If a remotely managed system has an ``/etc/ansible/facts.d`` directory, any files in this directory
ending in ``.fact``, can be JSON, INI, or executable files returning JSON, and these can supply local facts in Ansible.
An alternate directory can be specified using the ``fact_path`` play directive.
For instance assume a ``/etc/ansible/facts.d/preferences.fact``::