Modules
Modules can be used in a playbook to automate tasks. Ansible® executes each module on the target node and returns the result back to the controller.
The IBM® z/OS® CICS® collection provides modules for interacting with CMCI over an HTTP connection by leveraging the CMCI REST API, as well as modules to automate provisioning of a CICS TS region. These modules have different requirements of the managed node. For more detail see Requirements of managed nodes.
The region provisioning modules use two defaults groups that allow a user to specify the location of a CICS installation and a high level qualifier for all region data sets to be created under. The example below shows how to use these default groups within the cics_global_catalog module.
- name: Initialize a global catalog
ibm.ibm_zos_cics.global_catalog:
region_data_sets:
template: "REGIONS.ABCD0001.<< data_set_name >>"
cics_data_sets:
template: "CICSTS61.CICS.<< lib_name >>"
state: "initial"
In the above example, the global catalog will be created at the data set location REGIONS.ABCD0001.DFHGCD, and the CICS load libraries can be found at the location CICSTS61.CICS, which means that the SDFHLOAD library could be found at CICSTS61.CICS.SDFHLOAD.
These groups can be placed in a module_defaults section, which means that all the CICS provisioning modules will use the same high level qualifier for the region data sets, and the location of the CICS installation only has to be declared once for all the modules.
To override the data set location or name for a specific task, you can provide an
additional parameter to the region_data_sets
group as shown in the example
for a global catalog data set below.
- name: Initialize a global catalog with a custom name
ibm.ibm_zos_cics.global_catalog:
region_data_sets:
dfhgcd:
dsn: "MY.CICS.GLOBAL.CATALOG"
cics_data_sets:
template: "CICSTS61.CICS.<< lib_name >>"
state: "initial"
The IBM® z/OS® CICS® collection contains these modules. For each module, the accepted parameters, return values, and examples are provided in the documentation.
- auxiliary_temp – Create and remove the CICS auxiliary temporary storage data set
- cmci_action – Perform actions on CICS and CICSPlex SM resources
- cmci_create – Create CICS and CICSPlex SM definitions
- cmci_delete – Delete CICS and CICSPlex SM resources
- cmci_get – Query CICS and CICSPlex SM resources and definitions
- cmci_update – Update CICS and CICSPlex resources and definitions
- csd – Create, remove, and manage the CICS CSD
- global_catalog – Create, remove, and manage the CICS global catalog
- intrapartition – Create and remove the CICS transient data intrapartition data set
- local_catalog – Create, remove, and manage the CICS local catalog
- local_request_queue – Create and remove the CICS local request queue
- start_cics – Start a CICS region
- stop_cics – Stop a CICS Region
- trace – Allocate auxiliary trace data sets
- transaction_dump – Allocate transaction dump data sets