mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
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:
committed by
Brian Coca
parent
f078946ed3
commit
1b2ad94496
@@ -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
|
||||
|
||||
@@ -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``::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user