mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Check for rpm directly, don't imply from ansible_pkg_manager
Atomic host have neither dnf nor yum. So we cannot use that as a hueristic if they have rpm.
This commit is contained in:
parent
97b88fa563
commit
52999cd292
@ -13,9 +13,23 @@
|
||||
is_atomic: true
|
||||
when: s.stat.exists
|
||||
|
||||
- name: Determine if has rpm
|
||||
stat: path=/usr/bin/rpm
|
||||
register: s
|
||||
changed_when: false
|
||||
|
||||
- name: Init the has_rpm fact
|
||||
set_fact:
|
||||
has_rpm: false
|
||||
|
||||
- name: Set the has_rpm fact
|
||||
set_fact:
|
||||
has_rpm: true
|
||||
when: s.stat.exists
|
||||
|
||||
# collect information about what packages are installed
|
||||
- include: rpm.yml
|
||||
when: ansible_pkg_mgr == "yum" or ansible_pkg_mgr == "dnf"
|
||||
when: has_rpm
|
||||
|
||||
- include: centos.yml
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
Loading…
Reference in New Issue
Block a user