zos_gather_facts – Gather z/OS system facts.¶
Synopsis¶
Retrieve variables from target z/OS systems.
Variables are added to the ansible_facts dictionary, available to playbooks.
Apply filters on the gather_subset list to reduce the variables that are added to the ansible_facts dictionary.
Note, the module will fail fast if any unsupported options are provided. This is done to raise awareness of a failure in an automation setting.
Parameters¶
- gather_subset
If specified, it will collect facts that come under the specified subset (eg. ipl will return ipl facts). Specifying subsets is recommended to reduce time in gathering facts when the facts needed are in a specific subset.
The following subsets are available
ipl
,cpu
,sys
, andiodf
. Depending on the version of ZOAU, additional subsets may be available.required: Falsetype: listelements: strdefault: [‘all’]- filter
Filter out facts from the ansible_facts dictionary.
Uses shell-style fnmatch pattern matching to filter out the collected facts.
An empty list means ‘no filter’, same as providing ‘*’.
Filtering is performed after the facts are gathered such that no compute is saved when filtering. Filtering only reduces the number of variables that are added to the ansible_facts dictionary. To restrict the facts that are collected, refer to the gather_subset parameter.
required: Falsetype: listelements: strdefault: []
Examples¶
- name: Return all available z/OS facts.
ibm.ibm_zos_core.zos_gather_facts:
- name: Return z/OS facts in the systems subset ('sys').
ibm.ibm_zos_core.zos_gather_facts:
gather_subset: sys
- name: Return z/OS facts in the subsets ('ipl' and 'sys') and filter out all
facts that do not match 'parmlib'.
ibm.ibm_zos_core.zos_gather_facts:
gather_subset:
- ipl
- sys
filter:
- "*parmlib*"
Return Values¶
- ansible_facts
Collection of facts that are gathered from the z/OS systems.
returned: when collectedtype: dictsample:[ { "ansible_facts": { "arch_level": "2", "hw_name": "SYSZD6", "ipl_volume": "RES820", "lpar_name": "SVLLAB01", "primary_jes": "JES2", "product_mod_level": "00", "product_name": "z/OS", "product_owner": "IBM CORP", "product_release": "05", "product_version": "02", "smf_name": "3090", "sys_name": "EC33018A", "sysplex_name": "SVPLEX1", "vm_name": "EC33018A" } } ]