Files
kubernetes/contrib/ansible/roles/common/tasks/main.yml
Eric Paris 52999cd292 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.
2015-06-24 17:07:13 -04:00

39 lines
734 B
YAML

---
- name: Determine if Atomic
stat: path=/run/ostree-booted
register: s
changed_when: false
- name: Init the is_atomic fact
set_fact:
is_atomic: false
- name: Set the is_atomic fact
set_fact:
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: has_rpm
- include: centos.yml
when: ansible_distribution == "CentOS"
- include: fedora-install.yml
when: not is_atomic and ansible_distribution == "Fedora"