I have multiple lists of RPMs (one per configuration), and a set of remote machines. Each list includes all of the RPMs needed to run my machine in the configuration I choose.
For a given configuration and machine, I need to make sure that:
- Every RPM in the configuration's RPM list is installed, in the exact same version; and
- Any RPM not in the list is not installed (and uninstall it if necessary)
I've been looking into Ansible and its yum module, but though it's easy ensuring given RPMs are installed, I couldn't find a way to specify that any other RPMs should be uninstalled.
What's a good way of doing that?