Ansible® Collections From Broadcom Enable Modern, Off-platform Mainframe Automation

Jan Prihoda
Modern Mainframe
4 min readAug 10, 2022

--

The introduction of the IBM z/OS core collection on Ansible Galaxy a few years ago created an opportunity for vendors to empower their customers to easily develop off-platform automation for mainframe tasks. In this blog, I’ll show you how a new set of Ansible Collections from Broadcom can further help you eliminate the manual effort of repetitive mainframe activities.

Overview

Broadcom Ansible Collections are a great example of how the “Open-first” approach to mainframe modernization and automation can open the door to some huge benefits. The collections are built on top of existing Zowe CLI plugins to offer the same set of capabilities and as such, are designed to automatically grow in tandem with them.

Broadcom Ansible Collection Diagram
Broadcom Ansible Collection Diagram

As you can see, the schema is very simple. Since each of Broadcom’s Ansible Collections includes the respective Zowe plugin you don’t need to install anything else (neither on z/OS nor on the Ansible control node) with the exception of one unique collection, called zowe_core which is a dependency for all. Its task is simple: convert Ansible playbook keywords to Zowe CLI commands. And that's it. You don't need to install anything else!

The structure of the modules in the collection maps almost 1:1 to the structure of the corresponding Zowe CLI plugin commands. Therefore, if you are familiar with the Zowe CLI product plugin structure, you will be able to easily write a playbook using the product collection. Here’s a simple example of how you might validate the JCL in a mainframe JCL library using the JCLCheck collection:

Zowe CLI plugin example as Ansible module example

You can see that parameter names are identical, and the module name is a merge of the command group and plugin name. All of the other Zowe CLI plugins from Broadcom have been converted into Ansible modules and collections in the same manner.

Available Collections

In the initial release on Ansible Galaxy, these seven collections are available from the broadcom namespace:

  • broadcom.zowe_core
  • broadcom.ca7
  • broadcom.endevor
  • broadcom.endevor_bridge_for_git
  • broadcom.file_master_plus
  • broadcom.ops
  • broadcom.spool
  • broadcom.view

You may install them in the usual way, by issuing this CLI command ansible-galaxy collection install broadcom.<collection_name> on the Ansible control node. The full documentation for collection management is available at docs.ansible.com.

Coming soon you can expect to see new collections for:

  • broadcom.idms
  • broadcom.jclcheck
  • broadcom.mat
  • broadcom.mat_pma
  • broadcom.sysview

Note: To see the current list of collections, visit https://galaxy.ansible.com/broadcom.

Documentation And Support

For consistency, Broadcom Ansible collections follow IBM’s documentation structure and are available at this link: https://github.com/BroadcomMFD/broadcom-ansible-collections.

Collections are fully supported provided customers have an active license for the associated Broadcom product. The preferred method of recording issues is via the same GitHub repository to allow for visibility to all consumers.

Sample Playbook

To clearly demonstrate the possibilities enabled by Broadcom’s Ansible Collections, we’ve created a sample playbook to illustrate how easy they are to use.

Sample Ansible Playbook with Broadcom Ansible Collections' modules

This example demonstrates a simple use case in which you want to validate a mainframe JCL member prior to submitting it. The JCL member lives in Endevor and the validation is performed by JCLCheck. It is divided into 5 tasks. The first is responsible for retrieving the JCL and storing it locally. Next is just a debug step that shows the JCL in the playbook log. Step three uses JCLCheck to perform a check. If it is unsuccessful the playbook fails, if the check is ok the JCL is submitted using IBM z/OS Core collection module. The last task is here again just for debugging purposes.

With less than 40 lines of code, you can implement a popular use case involving several products with simple, straightforward commands. Something that easily could be considered too complex to automate is now within the realm of possibility thanks to Ansible and the Broadcom collections.

Links and Feedback

Anxious to give it a try? I don’t blame you. I recommend you begin your journey with these links:

If you would like to learn more, discuss a use case, report a bug, make a suggestion or provide feedback, please use the GitHub link or email me at jan.prihoda@broadcom.com. Thank you.

Special thanks to Michael DuBois, Peter Wassel, Rose Sakach, and Tomas Laurinec.

Ansible is a registered trademark of Red Hat, Inc. in the United States and other countries.

--

--

Jan Prihoda
Modern Mainframe

As a product owner at Broadcom I'm responsible for Zowe support.