I'm trying to create a mksysb and spot Resource from a mksysb image using an Ansible playbook. When I run the commands natively on the AIX 7.2 TL5 SP2 command line both Resources are created as expected.
nim -o define -t mksysb -a server=master -a location=/export/nim/mksysb/goldimage/goldimage_aix7252_2021_1001 goldimage_aix7252_2021_1001
nim -o define -t spot -a server=master -a location=/export/nim/spot -a source=goldimage_aix7252_2021_1001 goldimage_aix7252_2021_1001_spot
However, when I run the commands via an Ansible playbook using either the
command or
shell "builtin" modules the mksysb Resource is successfully created however the spot Resource fails with:
0042-001 nim: processing error encountered on "master"
0042-103 m_mkspot: unable to restore from goldimage_aix7252_2021_1001
# ansible --version
ansible 2.9.14
config file = /etc/ansible/ansible.cfg
configured module search path = ['/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/freeware/lib/python3.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.7.9 (default, Sep 14 2020, 06:09:55) [GCC 8.3.0]
Has anyone managed to get a "spot" Resource successfully created via a playbook?
Many thanks, Steve
** Resolution (07-Oct-2021) **Having cross checked the environment variables between the AWX and ansible CLI execuions of the playbook I add ODMDIR to the playbook (AWX) and re-ran, the "spot" was successfully created.
- name: Create NIM spot Resource
shell: |
nim -o define -t spot -a server=master -a location=/export/nim/spot -a source=goldimage_aix7252_2021_1001 goldimage_aix7252_2021_1001_spot
environment:
ODMDIR: /etc/objrepos
#AIXOpenSource