Install Python's RPM bindings (for package_facts)

This commit is contained in:
Sven Velt 2021-10-06 13:13:22 +02:00
parent c4e5053aba
commit 12fff8c858

View file

@ -7,6 +7,16 @@
mode: 0755
run_once: True
- name: "[RPM] Install pythonX-rpm"
package:
name: "python{{ ansible_facts.python.version.major|replace('2', '') }}-rpm"
when: ansible_pkg_mgr in ["dnf", "zypper"]
- name: "[RPM] Install rpm-python"
package:
name: "rpm-python"
when: ansible_pkg_mgr in ["yum"]
- package_facts:
ignore_errors: True