Mark,
I think you can file the bug at https://github.com/IBM/ansible-power-aix.
But do you really need the role? The job done by the script can be done by Ansible:
- name: Download Toolbox bundle
ansible.builtin.get_url:
url: "https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/dnf_bundle_aix_73.tar"
dest: "./dnf_bundle_aix_73.tar"
delegate_to: localhost
run_once: true
- name: Copy the bundle to server
ansible.builtin.raw: "scp {{ bundle_name }} {{ ansible_user }}@{{ inventory_hostname }}:"
delegate_to: localhost
- name: Create a temporary directory
ansible.builtin.raw: "mkdir -p /tmp/dnf_install"
- name: Unpack the bundle
ansible.builtin.raw: "tar xf {{ bundle_name }} -C /tmp/dnf_install"
- name: Install RPM packages
ansible.builtin.raw: "cd /tmp/dnf_install && ./install_dnf.sh -y"
become: true
register: rpm_install
- name: Show output
ansible.builtin.debug:
var: rpm_install.stdout_lines
Sorry, the formatting is wrong because this is part of another playbook with more checks and whistles. Of course, the script checks filesystem sizes and does some more jobs. Everything that you can incorporate into your playbook ;-)
The biggest disadvantage of the role is that it downloads the bundle from the Internet to every AIX server. There is no way to set the source of the bundle file. On AIX 7.3, there is no need for the role at all because Python is usually already installed in the standard installation unless you change it.
------------------------------
Andrey Klyachkin
https://www.power-devops.com------------------------------
Original Message:
Sent: Mon February 10, 2025 06:29 PM
From: Mark Steele
Subject: dnf_installer.sh question
I was just running an Ansible playbook that includes calling the power_aix_bootstrap role that's part of the ibm.power_aix collection.
Under the covers it runs the dnf_installer.sh script. It's failing after apparently successfully downloading dnf_bundle_aix_73.tar, even when I run the script outside of Ansible.
./dnf_installer.sh[70]: usage: not found.
Attempting download of dnf_bundle_aix_73.tar ...
Saving to 'dnf_bundle_aix_73.tar'...
223 MB received in 49 seconds (4.55 MB/sec)
Failed to download dnf_bundle_aix_73.tar
Looking at the underlying code, I see:
if LDR_CNTRL=MAXDATA=0x80000000@DSA /usr/opt/perl5/bin/lwp-download https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/dnf_bundle_aix_
73.tar; then
echo "Failed to download dnf_bundle_aix_73.tar"
cd - >/dev/null 2>&1 || exit 1
rm -rf "$tmppath"
exit 1
fi
That logic seems backwards to me. Basically to me it's saying if download successful; then say it failed and exit. Given I'm hardly the first person to run this script, I'm apparently missing something.
------------------------------
Mark Steele
Guru
Direct Systems Support
San Diego CA
------------------------------