name: "{{ item }}"
state: present
with_items: redhat_package_dependencies
+ when: ansible_pkg_mgr == "yum"
+
+- name: install dependencies
+ dnf:
+ name: "{{ item }}"
+ state: present
+ with_items: redhat_package_dependencies
+ when: ansible_pkg_mgr == "dnf"
- name: configure ceph yum repository
include: redhat_ceph_repository.yml
- ceph-mon
when:
ceph_stable_rh_storage and
- mon_group_name in group_names
+ mon_group_name in group_names and
+ ansible_pkg_mgr == "yum"
+
+- name: install red hat storage ceph mon
+ dnf:
+ name: "{{ item }}"
+ state: latest
+ with_items:
+ - ceph
+ - ceph-mon
+ when:
+ ceph_stable_rh_storage and
+ mon_group_name in group_names and
+ ansible_pkg_mgr == "dnf"
- name: install red hat storage ceph osd
yum:
- ceph-osd
when:
ceph_stable_rh_storage and
- osd_group_name in group_names
+ osd_group_name in group_names and
+ ansible_pkg_mgr == "yum"
+
+- name: install red hat storage ceph osd
+ dnf:
+ name: "{{ item }}"
+ state: latest
+ with_items:
+ - ceph
+ - ceph-osd
+ when:
+ ceph_stable_rh_storage and
+ osd_group_name in group_names and
+ ansible_pkg_mgr == "dnf"
- name: install Inktank Ceph Enterprise RBD Kernel modules
yum:
with_items:
- "{{ ceph_stable_ice_temp_path }}/kmod-libceph-{{ ceph_stable_ice_kmod }}.rpm"
- "{{ ceph_stable_ice_temp_path }}/kmod-rbd-{{ ceph_stable_ice_kmod }}.rpm"
- when: ceph_stable_ice
+ when:
+ ceph_stable_ice and
+ ansible_pkg_mgr == "yum"
+
+- name: install Inktank Ceph Enterprise RBD Kernel modules
+ dnf:
+ name: "{{ item }}"
+ with_items:
+ - "{{ ceph_stable_ice_temp_path }}/kmod-libceph-{{ ceph_stable_ice_kmod }}.rpm"
+ - "{{ ceph_stable_ice_temp_path }}/kmod-rbd-{{ ceph_stable_ice_kmod }}.rpm"
+ when:
+ ceph_stable_ice and
+ ansible_pkg_mgr == "dnf"
- name: install rados gateway
yum:
name: ceph-radosgw
state: latest
when:
- rgw_group_name in group_names
+ rgw_group_name in group_names and
+ ansible_pkg_mgr == "yum"
+
+- name: install rados gateway
+ dnf:
+ name: ceph-radosgw
+ state: latest
+ when:
+ rgw_group_name in group_names and
+ ansible_pkg_mgr == "dnf"
- name: configure rbd clients directories
file:
- httpd
- mod_fastcgi
- mod_fcgid
+ when: ansible_pkg_mgr == "yum"
+
+- name: install apache and fastcgi
+ dnf:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - httpd
+ - mod_fastcgi
+ - mod_fcgid
+ when: ansible_pkg_mgr == "dnf"
- name: install rados gateway vhost
template:
yum:
name: http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
changed_when: false
- when: ceph_stable
+ when:
+ ceph_stable and
+ ansible_pkg_mgr == "yum"
+
+- name: add ceph stable repository
+ dnf:
+ name: http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
+ changed_when: false
+ when:
+ ceph_stable and
+ ansible_pkg_mgr == "dnf"
- name: add ceph development repository
yum:
name: http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm
changed_when: false
- when: ceph_dev
+ when:
+ ceph_dev and
+ ansible_pkg_mgr == "yum"
+
+- name: add ceph development repository
+ dnf:
+ name: http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm
+ changed_when: false
+ when:
+ ceph_dev and
+ ansible_pkg_mgr == "dnf"
-- name: add inktank ceph enterprise repository
template:
src: redhat_ice_repo.j2
dest: /etc/yum.repos.d/ice.repo
yum:
name: python-pip
state: present
- when: ansible_os_family == 'RedHat'
+ when:
+ ansible_os_family == 'RedHat' and
+ ansible_pkg_mgr == "yum"
+
+- name: install pip on redhat
+ dnf:
+ name: python-pip
+ state: present
+ when:
+ ansible_os_family == 'RedHat' and
+ ansible_pkg_mgr == "dnf"
# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
- name: install docker-py
yum:
name: python-pip
state: present
- when: ansible_os_family == 'RedHat'
+ when:
+ ansible_os_family == 'RedHat' and
+ ansible_pkg_mgr == "yum"
+
+- name: install pip on redhat
+ dnf:
+ name: python-pip
+ state: present
+ when:
+ ansible_os_family == 'RedHat' and
+ ansible_pkg_mgr == "dnf"
# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
- name: install docker-py
yum:
name: python-pip
state: present
- when: ansible_os_family == 'RedHat'
+ when:
+ ansible_os_family == 'RedHat' and
+ ansible_pkg_mgr == "yum"
+
+- name: install pip on redhat
+ dnf:
+ name: python-pip
+ state: present
+ when:
+ ansible_os_family == 'RedHat' and
+ ansible_pkg_mgr == "dnf"
# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
- name: install docker-py
yum:
name: python-pip
state: present
- when: ansible_os_family == 'RedHat'
+ when:
+ ansible_os_family == 'RedHat' and
+ ansible_pkg_mgr == "yum"
+
+- name: install pip on redhat
+ dnf:
+ name: python-pip
+ state: present
+ when:
+ ansible_os_family == 'RedHat' and
+ ansible_pkg_mgr == "dnf"
# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
- name: install docker-py
yum:
name: python-pip
state: present
- when: ansible_os_family == 'RedHat'
+ when:
+ ansible_os_family == 'RedHat' and
+ ansible_pkg_mgr == "yum"
+
+- name: install pip on redhat
+ dnf:
+ name: python-pip
+ state: present
+ when:
+ ansible_os_family == 'RedHat' and
+ ansible_pkg_mgr == "dnf"
# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
- name: install docker-py