From 072c68ea79755e57f8fbee661acb2214c6bd55a9 Mon Sep 17 00:00:00 2001 From: davidobrien1 Date: Fri, 26 Feb 2016 22:40:43 +1100 Subject: [PATCH] Restore filter on Windows and version reference for Windows facts. --- lib/ansible/modules/system/setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/system/setup.py b/lib/ansible/modules/system/setup.py index beebd42b8ef..8830e9d255d 100644 --- a/lib/ansible/modules/system/setup.py +++ b/lib/ansible/modules/system/setup.py @@ -35,7 +35,7 @@ options: description: - path used for local ansible facts (*.fact) - files in this dir will be run (if executable) and their results be added to ansible_local facts - if a file is not executable it is read. + if a file is not executable it is read. Check notes for Windows options. (from 2.1 on) File/results format can be json or ini-format required: false default: '/etc/ansible/facts.d' @@ -54,10 +54,13 @@ notes: install I(facter) and I(ohai) means you can avoid Ruby-dependencies on your remote systems. (See also M(facter) and M(ohai).) - 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 + 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. author: - "Ansible Core Team" - "Michael DeHaan"