when: ansible_os_family == "RedHat"
- name: Install RPM requirements
- yum:
+ package:
name: "{{ item }}"
state: present
with_items:
- rpmdevtools
- openssl-devel
- libffi-devel
- when: ansible_pkg_mgr == "yum"
+ when: ansible_os_family == "RedHat"
- - name: install packages from epel
+ - name: install packages from epel (<=7)
yum:
name: "{{ item }}"
state: present
with_items:
- jq
- python-pip
- when: ansible_os_family == "RedHat"
+ when:
+ - ansible_os_family == "RedHat"
+ - ansible_distribution_major_version|int <= 7
+
+ - name: install packages from epel (>=8)
+ dnf:
+ name: "{{ item }}"
+ state: present
+ enablerepo: epel
+ update_cache: yes
+ with_items:
+ - jq
+ - python3-pip
+ when:
+ - ansible_os_family == "RedHat"
+ - ansible_distribution_major_version|int >= 8
# Run the equivalent of "apt-get update" as a separate step
- apt:
---
+# This playbook needs to be updated for EL8 compatibility
- hosts: all
become: true
# This playbook is used to configure static libvirt&&vagrant slaves.
# Ubuntu >= 16.04 and CentOS 7.3 are the only tested distros
#
+# This playbook needs to be updated for EL8 compatibility
+#
# Example usage:
# On a baremetal node already configured by the github.com/ceph/ceph-cm-ansible common role,
# `cd ceph-build/ansible && cp examples/slave_libvirt_static.yml .` then:
mode: 0644
when: ansible_pkg_mgr == "yum"
- - name: Install RPM requirements
+ - name: Install RPM requirements (All distro versions)
sudo: yes
- yum:
+ package:
name: "{{ item }}"
state: present
update_cache: yes
- epel-release
- java-1.8.0-openjdk
- git
- - python-pip
- - python-virtualenv
- libtool
#- rpm-sign
- autoconf
- rpmdevtools
- openssl-devel
- libffi-devel
- when: ansible_pkg_mgr == "yum"
+ when:
+ - ansible_os_family == "RedHat"
+
+ - name: Install RPM requirements (<=7)
+ sudo: yes
+ package:
+ name: "{{ item }}"
+ state: present
+ update_cache: yes
+ with_items:
+ - python-pip
+ - python-virtualenv
+ when:
+ - ansible_os_family == "RedHat"
+ - ansible_distribution_major_version|int <= 7
+
+ - name: Install RPM requirements (>=8)
+ sudo: yes
+ package:
+ name: "{{ item }}"
+ state: present
+ update_cache: yes
+ with_items:
+ - python3-pip
+ - python3-virtualenv
+ when:
+ - ansible_os_family == "RedHat"
+ - ansible_distribution_major_version|int >= 8
- name: install packages from epel
- yum:
+ package:
name: jq
state: present
enablerepo: epel