I concur, that would be an important step to make the modules behave as expected. I've seen that same issue, not being idempotent, on the ibm.power_hmc.powervm_dlpar module when adding specific NPIV adapters, for example.
Original Message:
Sent: Wed November 13, 2024 04:29 AM
From: Krister Karlsson
Subject: Input on Ansible for Power Use cases
Hi,
For the Ansible Power collection modules for IBM i, I would rather see that the existing modules gets a refresh before adding new modules/functions.
What I feel is lacking for the existing modules:
Many of the ibm.power_ibmi.ibmi_* modules is not idempotent, they will fail if the state is already the prefered state. The goal for Ansible modules is to have desired state and 'idempotency': https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html
As of now you have to check the state before you make the action or use ignore_errors: true
Some of the modules does not provide any added value than using the native CL command with the ibm.power_ibmi.ibmi_cl_command module, for example:
ibm.power_ibmi.ibmi_start_subsystem
ibm.power_ibmi.ibmi_end_subsystem
ibm.power_ibmi.ibmi_tcp_server_service
ibm.power_ibmi.ibmi_start_subsystem and ibm.power_ibmi.ibmi_end_subsystem: There is no reason to have two separate modules, they should be migrated to a common ibm.power_ibmi.ibmi_subsystem module and use idempotency and also have the option to monitor for when all jobs and the subsystem are ended. Restart option would also be nice.
ibm.power_ibmi.ibmi_tcp_server_service: You can't specify instances for *HTTP, *IAS. This module should also have a restart option, so you could specify that a service should be restarted.
ibm.power_ibmi.ibmi_sql_execute is lacking an option to set SQL options, it will fail if I try to change a non journaled file/table. There should be a parameter where you can set SQL options.
ibm.power_ibmi.ibmi_cl_command needs a parameter to set the same thing as you can do with the CHGJOB command, you may want to set a different library list or current library etc, before you execute the command.
This is just a few suggestions.
------------------------------
Krister Karlsson
Original Message:
Sent: Thu October 10, 2024 11:48 AM
From: HARIGANESH MURALIDHARAN
Subject: Input on Ansible for Power Use cases
Hi Everyone,
We need your input! As part of our ongoing efforts to improve automation capabilities for IBM Power systems, we're looking to identify any missing Ansible modules or functions in the current Power collection for AIX, IBM i, HMC, and VIOS.
If you've encountered any gaps or if there are specific features you'd like to see added, let us know by replying to this post. Your feedback will help us enhance the Ansible collection and deliver the tools you need to streamline your operations.
Thank you for contributing and making this community stronger!
------------------------------
Hariganesh Muralidharan, Senior Technical Staff Member, IBM
------------------------------