Ah, understood.
The piece I'm thinking of is as per the below (taken from my current script).
I'll take a look to see if I can fathom how to include these as part of the overall Role. Initial thoughts would be to have "extra" options for "just" the "pre" and "post" scripts a.k.a. Phase 4 and 7 as they're called out in the actual nimadm command's -a and -z parms.
Original Message:
Sent: Tue February 20, 2024 01:00 PM
From: Rich Jefferies
Subject: Share your thoughts on AIX automation use cases of high value
Hi Steve.
The bundle is for fixes to be installed I'm not sure you could use it for the scripts.
My modification on the role was to build up a variable "nimadm_options" which was then passed to the nimadm command:
command: "/usr/sbin/nimadm -c {{ nim_client }} -l {{ lpp_source }} -s {{ spot }} {{ nimadm_options }} -Y -d {{ client_target_disk | quote }}"
The role could be further modified to allow for pre/post scripts to be included. Just watch out for the logic that clears the nimadm_options variable if the cache VG or bundle had not previously been passed.
------------------------------
Rich Jefferies
------------------------------
Original Message:
Sent: Tue February 20, 2024 06:05 AM
From: Steve Munday
Subject: Share your thoughts on AIX automation use cases of high value
Rich,
Ah-ha! Thanks for the guidance. So we'd be able to use a "script" resource against the "nimadm_bundle" option, correct?
Many thanks, steve
------------------------------
Steve Munday
AIX, IBM i, HMC, PowerVM
Original Message:
Sent: Tue February 20, 2024 05:58 AM
From: Rich Jefferies
Subject: Share your thoughts on AIX automation use cases of high value
Hi Steve.
Your "ask" is already included in the collection as part of the additions I made for a previous requirement, however it is probably currently undocumented.
There are three additional options:
- nimadm_cache_vg: Name of VG on NIM Master to use for cacheVG
- nimadm_bundle: Name of Bundle resource to install post upgrade
- nimadm_bidata: Name of custom Bos Inst Data to use during upgrade
Below is an example of how to invoke the options.
I'd added the "default('N/A')" to avoid errors if the variable was not defined, as the role is coded for "N/A", but should also work with "default(omit)"
- name: Include nim_alt_disk_migration role
include_role:
name: nim_alt_disk_migration
apply:
delegate_to: "{{ NIM_Master }}"
connection: "{{ NIM_Conn }}"
vars:
nim_client: "{{ NIM_Client }}"
target_disk:
disk_name: "{{ Target_DISK.disk_name }}"
force: "{{ NIMADM_Force }}"
lpp_source: "{{ Target_LPPS }}"
spot: "{{ Target_SPOT }}"
nim_mast_lpp: "{{ NIM_Mast_LPP }}"
nimadm_cache_vg: "{{ NIMADM_VG | default('N/A') }}"
nimadm_bundle: "{{ Target_eFix | default('N/A') }}"
nimadm_bidata: "{{ BOS_Inst_Data | default('N/A') }}"
control_phases:
validate_nim_resources: "{{ NIM_Res_Check }}"
perform_migration: "{{ NIM_Migration }}"
debug_skip_nimadm: "{{ Skip_nimadm }}"
------------------------------
Rich Jefferies
Original Message:
Sent: Tue February 20, 2024 05:26 AM
From: Steve Munday
Subject: Share your thoughts on AIX automation use cases of high value
Carl,
Hi, good morning.
Here's my Top 3 plus an "ask"
- Add patching support for AIX Live Kernel Update
- New module to manage NFS
- NIM module updates to support new AIX installs
The "ask"
Expand the functionality of the "nim_alt_disk_migration" Role so that it can use Cache VGs along with pre- (Phase 4) and post- (Phase 7) script executions.
Many thanks, Steve
------------------------------
Steve Munday
AIX, IBM i, HMC, PowerVM