Ansible – Installing RPM Packages Using rpm Application Instead of yum

aixansiblerpm

I want to install some RPM packages using Ansible and the installed rpm package manager. yum is not installed.

Using command module with rpm -i {{package}} causes the task to fail if the package is already installed. I'm searching for an idiomatic way to install the packages like yum or apt modules does it.

Best Answer

Install yum, plus yum-utils, and use the yum module. Not installed by default on AIX, but can be done.

Requirements include the yum and rpm Python modules. I'm unclear on which package provides the rpm bindings, something has to for yum to work. Possibly from the rpm fileset, but unfortunately I do not have an AIX box to test with.