Closed SpringIBM closed 1 month ago
Looks like a bug in the latest version of the nim_alt_disk_migration role's main.yml to me.
'nimadm_phases_to_run' is undefined.
At the start of main.yml it runs
- name: "Fail when '{{ nimadm_phases_to_run }}' contains invalid characters"
fail:
msg: "{{ nimadm_phases_to_run }} contains alpha charcaters or a trailing comma, exiting"
when: nimadm_phases_to_run is regex("[^0-9,]") or nimadm_phases_to_run[-1] == ','
This probably needs to be changed as follows:
- name: "Fail when '{{ nimadm_phases_to_run }}' contains invalid characters"
fail:
msg: "{{ nimadm_phases_to_run }} contains alpha charcaters or a trailing comma, exiting"
when:
- nimadm_phases_to_run is defined
- nimadm_phases_to_run is regex("[^0-9,]") or nimadm_phases_to_run[-1] == ','
There may be a more elegant way to fix it, but later on it is setting values to "N/A" is not set - and I think that would cause the regex to fail the playbook
Hello there,
Due to my purpose to use ansible to perform AIX update service pack (SP) on NIM client (A.K.A: Ansible Managed node.)
Ansible Env:
To update SP on Managed ndoe/NIM Client. FROM: 7300-02-00-0000 TO: 7300-02-01-2346
Seems my mistaken and confuse to choose the example playbooks were included in ""ibm-power_aix-1.8.3" collection between "demo_nim_alt_disk_migration.yml" and "demo_nim.yml" file.
name: "CK-PB-TEST-4 - NIM operation on AIX/VIOS UPDATE SP01 ON 2 LPARs..." hosts: efsnim-p1 remote_user: root gather_facts: no vars: check_targets_v: standalone install_targets_v: lpar112,lpar111 update_lpp_v: lpp_source_aix73
collections:
tasks:
And then run playbook above is took very short time and I verified "oslevel -s" were shown the AIX 7.3 Service Pack update successful.
Regards, Charin Kumjudpai.
Hi @SpringIBM ! We have a newer version of NIM Alt disk migration role present on Github, please use that one and let us know if the issue still persists.
This newer version would be available on Galaxy by next week.
Had exactly the same problem. Thanks for the solution 👍
Describe the bug Run playbook and errors. [ckansible@efsnim-p1:/home/ckansible/ck-ans-02]$ ansible-playbook playbooks/cg_nim_alt_disk_migration_lpar112_hdisk0.yml -u root --private-key=./devops_key/devops_id_ed25519
To Reproduce Steps to reproduce the behavior: ENV:
NIM LPP_SOURCE, SPOT, NIM client and lspv on nimclinent information.
Ansible on Control node and ibm.power_aix 1.8.3 collection.
Playbook, by reference "Migrating to AIX 7.3 with nimadm and Ansible" in url: https://community.ibm.com/community/user/power/blogs/chris-gibson1/2024/03/13/migrating-to-aix-73-with-nimadm-and-ansible
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context I've test the simple playbook was included in ibm-power_aix-1.8.3 collection "demo_nim_alt_disk_migration.yml" getting same errors.