ibm.ibm_zos_core.filter_wtor_messages (1.9.0) — filter

Filter a list of WTOR messages

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

Authors: Demetrios Dimatos (@ddimatos)

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

Filter a list of WTOR (write to operator with reply) messages found by module zos_operator_action_query.

Filter using a string or regular expression.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Filter actionable messages that match 'IEE094D SPECIFY OPERAND' and if so, set is_specify_operand = true.
  set_fact:
    is_specify_operand: "{{ result | ibm.ibm_zos_core.filter_wtor_messages('IEE094D SPECIFY OPERAND') }}"
  when: result is defined and not result.failed
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Evaluate if there are any existing dump messages matching 'IEE094D SPECIFY OPERAND'
  assert:
    that:
        - is_specify_operand is defined
        - bool_zos_operator_action_continue
    success_msg: "Found 'IEE094D SPECIFY OPERAND' message."
    fail_msg: "Did not find 'IEE094D SPECIFY OPERAND' message."

Inputs

    
text:
    description:
    - String of text to match or a regular expression to use as filter criteria.
    required: true
    type: str

ingore_case:
    default: false
    description:
    - Should the filter enable case sensitivity when performing a match.
    required: false
    type: bool

wtor_response:
    description:
    - A list containing response property `message_text`, provided the module zos_operator_action_query.
    - The list can be the outstanding messages found in the  modules response under the
      `actions` property or the entire module response.
    required: true
    type: list

Outputs

_value:
  description: A list containing dictionaries matching the WTOR.
  elements: dict
  type: list