(cherry picked from commit 2d2c5d5ed7
)
This commit is contained in:
parent
ea9a223ab6
commit
aacff5e35f
1 changed files with 5 additions and 6 deletions
|
@ -47,12 +47,16 @@ options:
|
||||||
description:
|
description:
|
||||||
- Path used for local ansible facts (C(*.fact)) - files in this dir
|
- Path used for local ansible facts (C(*.fact)) - files in this dir
|
||||||
will be run (if executable) and their results be added to C(ansible_local) facts.
|
will be run (if executable) and their results be added to C(ansible_local) facts.
|
||||||
If a file is not executable it is read instead. Check notes for Windows options. (from 2.1 on)
|
If a file is not executable it is read instead.
|
||||||
File/results format can be JSON or INI-format. The default C(fact_path) can be
|
File/results format can be JSON or INI-format. The default C(fact_path) can be
|
||||||
specified in C(ansible.cfg) for when setup is automatically called as part of
|
specified in C(ansible.cfg) for when setup is automatically called as part of
|
||||||
C(gather_facts).
|
C(gather_facts).
|
||||||
NOTE - For windows clients, the results will be added to a variable named after the
|
NOTE - For windows clients, the results will be added to a variable named after the
|
||||||
local file (without extension suffix), rather than C(ansible_local).
|
local file (without extension suffix), rather than C(ansible_local).
|
||||||
|
- Since Ansible 2.1, Windows hosts can use C(fact_path). Make sure that this path
|
||||||
|
exists on the target host. Files in this path MUST be PowerShell scripts C(.ps1)
|
||||||
|
which outputs an object. This object will be formatted by Ansible as json so the
|
||||||
|
script should be outputting a raw hashtable, array, or other primitive object.
|
||||||
required: false
|
required: false
|
||||||
default: /etc/ansible/facts.d
|
default: /etc/ansible/facts.d
|
||||||
description:
|
description:
|
||||||
|
@ -73,11 +77,6 @@ notes:
|
||||||
- The filter option filters only the first level subkey below ansible_facts.
|
- The filter option filters only the first level subkey below ansible_facts.
|
||||||
- If the target host is Windows, you will not currently have the ability to use
|
- If the target host is Windows, you will not currently have the ability to use
|
||||||
C(filter) as this is provided by a simpler implementation of the module.
|
C(filter) as this is provided by a simpler implementation of the module.
|
||||||
- If the target host is Windows you can now use C(fact_path). Make sure that this path
|
|
||||||
exists on the target host. Files in this path MUST be PowerShell scripts (``*.ps1``) and
|
|
||||||
their output must be formattable in JSON (Ansible will take care of this). Test the
|
|
||||||
output of your scripts.
|
|
||||||
This option was added in Ansible 2.1.
|
|
||||||
- This module is also supported for Windows targets.
|
- This module is also supported for Windows targets.
|
||||||
- This module should be run with elevated privileges on BSD systems to gather facts like ansible_product_version.
|
- This module should be run with elevated privileges on BSD systems to gather facts like ansible_product_version.
|
||||||
author:
|
author:
|
||||||
|
|
Loading…
Reference in a new issue