Hi Andrey,
Yes dnf modules are 32bit right now hence it would be used with 32bit python.
The reason for that is rpm and its library are 32bit in AIX.
For future release of AIX we will look for 64bit solution but for AIX 7.1 and 7.2 this is going to be the case. Where ansible dnf module will have to use 32bit python3.
------------------------------
SANKET RATHI
------------------------------
Original Message:
Sent: Wed June 23, 2021 04:55 PM
From: Andrey Klyachkin
Subject: Ansible and DNF
looks like the cause for the error is the following line in ansible.cfg:
interpreter_python = /opt/freeware/bin/python3
If the line is changed to python3_32 (32 bit version of python3), everything works ok:
interpreter_python = /opt/freeware/bin/python3_32
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Wed June 23, 2021 04:50 PM
From: Andrey Klyachkin
Subject: Ansible and DNF
Trying to update packages using DNF module:
- name: update all RPM packages using dnf
dnf:
name: '*'
state: latest
Got the following error:
fatal: [server]: FAILED! => {"changed": false, "cmd": "dnf install -y python3-dnf", "msg": "Could not import the dnf python module using /opt/freeware/bin/python (3.7.10 (default, May 13 2021, 04:50:00) [GCC 8.3.0]). Please install `python3-dnf` package or ensure you have specified the correct ansible_python_interpreter.", "rc": 0, "results": [], "stderr": "", "stderr_lines": [], "stdout": "AIX generic repository 101 kB/s | 11 MB 01:55 \nAIX noarch repository 62 kB/s | 1.0 MB 00:16 \nAIX 7.2 specific repository 67 kB/s | 1.1 MB 00:16 \nLast metadata expiration check: 0:00:15 ago on Wed Jun 23 22:33:00 2021.\nPackage python3-dnf-4.2.17-1.noarch is already installed.\nDependencies resolved.\nNothing to do.\nComplete!\n", "stdout_lines": ["AIX generic repository 101 kB/s | 11 MB 01:55 ", "AIX noarch repository 62 kB/s | 1.0 MB 00:16 ", "AIX 7.2 specific repository 67 kB/s | 1.1 MB 00:16 ", "Last metadata expiration check: 0:00:15 ago on Wed Jun 23 22:33:00 2021.", "Package python3-dnf-4.2.17-1.noarch is already installed.", "Dependencies resolved.", "Nothing to do.", "Complete!"]}
Could not import the dnf python module using /opt/freeware/bin/python
python3-dnf is installed, that's why it says "Nothing to do":
# rpm -qa | grep 3-libdnf
python3-libdnf-0.39.1-1.ppc
------------------------------
Andrey Klyachkin
https://www.power-devops.com
------------------------------