IBM z/OS Ansible Core 1.6.0 has released to Automation Hub, Galaxy and is available in GitHub. This release includes a new zos_volume_init
module, enhancements, bugfixes and extends support to ansible-core
2.15 and comes with optional support and service for Automation Hub users and community support for Galaxy users.
New Module
In an effort to grow the offerings capabilities, the IBM DFMS team and the IBM z/OS core collection teams got together and decided that it was time for the collection to extend its capabilities and allow for volume initialization. The zos_volume_init
module depends on the ICKDSF programs INIT command to initialize a volume and brings with it the Ansible experience on operations such as:
- Initialize a volume or minidisk on z/OS.
- Create the volume label and entry into the volume table of contents (VTOC).
- Configure volume options such as:
- address - the address of the volume or minidisk.
- verify_offline - verify that the device is not online to any other systems.
- volid - the volume serial number used to initialize a volume or minidisk.
- vtoc_size - the number of tracks to initialize the volume table of contents (VTOC) with.
- sms_managed - specify that the volume be managed by Storage Management System (SMS).
- and more ....
A few important points to note when using the zos_volume_init
module is that ICKDSF is an Authorized Program Facility (APF) program and the zos_init_volume
module will run in authorized mode. Generally the ICKDSF program is protected by facility class STGADMIN.ICK.INIT such that the user executing the Ansible playbook must have a profile defined that permits access. If the ICKDSF program is not APF authorized, the Ansible zos_volume_init
module task will end.
Enhancements
zos_copy
added a performance enhancement that when restoring from a backup, data sets no longer need to be re-allocted. The module also updated the mode option, so permissions are applied to existing directories and files.
zos_data_set
and zos_lineinfile
introduced a force option that allows for data set members to be deleted while a PDS or PDSE is in use by a long running task.
zos_tso_command
introduced new option max_rc that will instruct the module of an acceptable return code. Prior to this change, a non-zero return code was interpreted as an error while there are cases where a return code of 4 or 8 are acceptable and should not be considered a task failure.
zos_blockinfile
can support double quotes in the content block. This enhancement is important when editing or generating scripts where often double quotes are needed. For example, consider a shell script update where both double and single quotes are being used to cat
a data set:
- name: Update a script with commands containing quotes.
zos_blockinfile:
src: "script.sh"
insertafter: "EOF"
block: |
cat "//'{{ DS_NAME }}'"
cat "//'{{ DS_NAME_2 }}'"
zos_job_query
now supports embedded positional wild card placement in both, job_name and job_id. In the past, only a trailing wild card was supported limiting the list being queried. Now you can place wild cards in either the job_name, job_id or in both for more explicit processing, for example:
- name: Query jobs using wildcards to match any job name begging with 'H' and ending in 'O'.
zos_job_query:
job_name: "H*O"
- name: Query jobs using a wildcards to match a range of job id(s) that include 'JOB' and '014'.
zos_job_query:
job_id: JOB*014*
- name: Query all job names beginning wih 'H' that match job id that includes '14'.
zos_job_query:
job_name: "H*"
job_id: "JOB*14*"
Bugfixes
Several of the modules fixed bugs that we will discuss here, but for a complete list, please review the release notes or changelog.
zos_copy
fixed how it computes record length, filters newlines, and treats binary files when interacting with different EBCDIC encodings. When setting the modules mode, it was updated to ensure that it does not change the mode for the source directory when copying files to a destination. Both zos_copy
and zos_fetch
were updated to correct a warning that recently started to appear because of some shared ansible-core
code that will be deprecated in the future.
zos_encode
corrected the file tagging issue that would leave files without a code set.
zos_find
when provided a list of patterns to search for, now the module will search the entire list even if some are not found.
zos_data_set
fixes a cataloging error for VSAM data sets and an issue that would occasionally leave behind VSAM index components when instructed to delete a VSAM data set.
zos_gather_facts
fixes a issue that prevented the module from executing with newer versions of ZOAU.
Certified Content
The
IBM z/OS Ansible core collection is
Ansible Automation Platform certified content which ensures compatibility with
Ansible Automation Platform. As part of the certification process, our collection must pass the requirements set by
Ansible Automation Platform and in this release, that was to ensure compatibly with
ansible-core
v2.15 (Ansible 8). Although there are other requirements, this certification is important because it ensures you can migrate to the latest
ansible-core
and resolve known issues such as this
buffer related issue that would occur when using
zos_copy
on older versions of
ansible-core
.