ibm.ibm_zos_core.zos_gather_facts (1.9.0) — module

Gather z/OS system facts.

| "added in version" 1.5.0 of ibm.ibm_zos_core"

Authors: Ketan Kelkar (@ketankelkar)

Install collection

Install with ansible-galaxy collection install ibm.ibm_zos_core:==1.9.0


Add to requirements.yml

  collections:
    - name: ibm.ibm_zos_core
      version: 1.9.0

Description

Retrieve variables from target z/OS systems.

Variables are added to the I(ansible_facts) dictionary, available to playbooks.

Apply filters on the I(gather_subset) list to reduce the variables that are added to the I(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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Return all available z/OS facts.
  ibm.ibm_zos_core.zos_gather_facts:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Return z/OS facts in the systems subset ('sys').
  ibm.ibm_zos_core.zos_gather_facts:
    gather_subset: sys
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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*"

Inputs

    
filter:
    default: []
    description:
    - Filter out facts from the I(ansible_facts) dictionary.
    - Uses shell-style L(fnmatch, https://docs.python.org/3/library/fnmatch.html) 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 I(ansible_facts) dictionary. To restrict the facts that are collected, refer
      to the I(gather_subset) parameter.
    elements: str
    required: false
    type: list

gather_subset:
    default:
    - all
    description:
    - 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 C(ipl), C(cpu), C(sys), and C(iodf). Depending
      on the version of ZOAU, additional subsets may be available.
    elements: str
    required: false
    type: list

Outputs

ansible_facts:
  description: Collection of facts that are gathered from the z/OS systems.
  returned: when collected
  sample:
  - 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
  type: dict