Files
ansible-role-tripleo-modify…/tasks/yum_common.yml
yatinkarel 2c53d70612 Use dnf/yum vars based on what is available
With [1] it used yum/vars but in CentOS8-Stream
that is not available, so detect and use dnf or yum
vars.

Closes-Bug: #1927302
Change-Id: Idda53d1b68b97e5bb65314b1e07d507736932531
2021-05-06 12:21:26 +05:30

13 lines
340 B
YAML

---
- name: Identify the primary package manager (dnf or yum)
shell: command -v dnf || command -v yum
register: pkg_mgr_output
- name: Set fact for the used package manager binary
set_fact:
pkg_mgr: "{{ pkg_mgr_output.stdout }}"
- name: Set fact for pkg_mgr_suffix
set_fact:
pkg_mgr_suffix: "{{ pkg_mgr.split('/')[-1] }}"