Ansible for IBM Z

Ansible for IBM Z

Ansible for IBM Z

Facilitate communication, user interaction and feedback for Red Hat Ansible Certified Content for IBM Z

 View Only

IBM Ansible Core v1.15.0-beta.1 is now available!

By Oscar Fernando Flores Garcia posted 11 hours ago

  
The latest beta release of IBM Ansible Core, v1.15.0-beta.1, brings a wave of powerful enhancements and critical bugfixes aimed at improving automation capabilities for z/OS environments. This update focuses on expanding module functionality, improving data set handling, and refining encoding and migrated data sets support. Whether you're managing GDG generations, working with migrated data sets, or fine-tuning encoding workflows, this release offers meaningful improvements to streamline your automation tasks.    
  

Enhancements. 

- zos_archive.  
 
  - Introduced support for encoding files before archiving. Giving users the ability to skip specific files when using the encoding options, also, the source files will revert the encoding after archiving.  
  
zos_copy.  
  
  - New identical_gdg_copy option to preserve GDG generation names when copying to a new base.
  - Support for alias names in src and dest for PS, PDS, and PDSE data sets.
  - Documentation updated to reflect binary destination block size change from 32760 to 32720.
  - Added support for British pound (£) character in file content and data set names.
  - Documentation now includes guidance on recalling migrated data sets.   
  
- zos_find.  
  
  - Enhanced to locate migrated data sets.
  - Can now search multiple data set types simultaneously.  
  
- zos_mvs_raw.  
  
  - Added reserved_cols option to allow content in columns 1 and 2, previously reserved for JCL.
  - Support for volume data definition.
  - Example added for recalling migrated data sets.  
  
- zos_lineinfile.  
  
  - Ensures consistent return of return_content and backup_name in responses.  
  
- zos_stat.  
  
  - Now supports recalling migrated data sets.
  - Introduced new fields: isfile, isdataset, isaggregate, and isgdg.
  - Added exists field to indicate resource presence on the managed node.  
  
- zos_tso_cmd.  
  
  - Example added for recalling migrated data sets.  
  
- zos_unarchive.  
  
  - Encoding support added to allow encoding files after unarchiving.  
  

Bugfixes. 

  
- zos_backup_restore.  
  
  - Fixed issue where backup_name was not returned upon success.  
  
- zos_data_set.  
  
  - Creating a data set with the same name on a different volume now correctly reports failure and guides users to uncatalog the existing data set.  
  
- zos_stat.  
  
  - Added support to query data sets using aliases.  
  
- zos_fetch.  
  
  - Fixed permission errors when using become to fetch data sets or members.  
  
- zos_lineinfile.  
  
  - Corrected false negatives when special characters were present in the line option.  
  

New Module: zos_replace

    

The new zos_replace module, introduced in version 1.15.0-beta.1 of the IBM z/OS Core Collection, brings powerful and flexible pattern replacement capabilities to z/OS automation. Whether you're working with USS files, sequential data sets, or members of partitioned data sets, this module allows you to search for patterns using regular expressions and replace them with custom strings or remove them entirely. It also supports scoped replacements using before and after markers, giving you precise control over where changes are applied. With built-in backup options and support for encoding, zos_replace is ideal for safely editing configuration files, JCL, or log data.

  

Here’s a practical example: suppose you want to clean up a USS file by replacing all occurrences of the string profile/ to new_profile/. You can do this with a simple playbook task:

- name: Replace with blank space on a USS file any occurrences of the regex
  zos_replace:
    target: /tmp/src/somefile
    regexp: 'profile\/'
    replace: 'new_profile/'
  
This task scans the file and removes every match of the pattern. You can also combine it with backup: true to preserve the original file before making changes. Whether you're modernizing legacy scripts or automating routine edits, zos_replace makes it easier and safer than ever.
  
  
Ready to Try It?  
  
This is a beta release, so while it’s not yet production-certified, it’s a great opportunity to explore new features and provide feedback. If you’ve been looking for better control over GDGs, encoding flexibility, or improved data set discovery—v1.15.0-beta.1 is worth a spin.  
    
You can install the beta version using:  
ansible-galaxy collection install ibm.ibm_zos_core:1.15.0-beta.1.  
  
Let us know what you think, and stay tuned for the full production release!  
  
Got questions or feedback?  
Drop by our GitHub discussions or open issues at: https://github.com/ansible-collections/ibm_zos_core/issues  
  
About the Author. 
    

Oscar Fernando Flores Garcia is the IBM z/OS Ansible Core Team Lead, with over 8 years of experience. Now leading the design and development of the ansible core product, responsible for many of the product releases.

    
The Development Team

  

Without the development team, this would not be possible. I would like to thank the amazing team who work with passion and perseverance on this project. 

  

  • Rich Parker
  • Oscar Fernando Flores Garcia
  • Ivan Alejandro Moreno Soto
  • Andre Marcel Gutierrez Benitez
  • Surendra Ravella
  • Mayank Mani
  • Rohitash Goyal

  

Resources

IBM Ansible z/OS core on Galaxy
IBM Ansible Core Collection Repository on GitHub
IBM Ansible Core Collection on Automation Hub
Red Hat® Ansible Certified Content for IBM Z documentation

0 comments
8 views

Permalink