ceph-ansible/roles/ceph-common/tasks/installs/install_on_redhat.yml

211 lines
5.9 KiB
YAML

---
- name: install redhat dependencies via yum
yum:
name: "{{ item }}"
state: present
with_items: redhat_package_dependencies
when:
- ansible_distribution == "RedHat"
- ansible_pkg_mgr == "yum"
- name: install redhat dependencies via dnf
dnf:
name: "{{ item }}"
state: present
with_items: redhat_package_dependencies
when:
- ansible_distribution == "RedHat"
- ansible_pkg_mgr == "dnf"
- name: install centos dependencies via yum
yum:
name: "{{ item }}"
state: present
with_items: centos_package_dependencies
when:
- ansible_distribution == "CentOS"
- ansible_pkg_mgr == "yum"
- name: install centos dependencies via dnf
dnf:
name: "{{ item }}"
state: present
with_items: centos_package_dependencies
when:
- ansible_distribution == "CentOS"
- ansible_pkg_mgr == "dnf"
- name: configure ceph yum repository
include: redhat_ceph_repository.yml
when: ceph_origin == 'upstream'
- name: install ceph
yum:
name: ceph
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when: not use_server_package_split
- name: install distro or red hat storage ceph mon
yum:
name: "ceph-mon"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- mon_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_dev
or ceph_origin == "distro"
or ceph_custom
- name: install distro or red hat storage ceph mon
dnf:
name: "ceph-mon"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- mon_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph osd
yum:
name: "ceph-osd"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- osd_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph osd
dnf:
name: "ceph-osd"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- osd_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph mds
yum:
name: "ceph-mds"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- mds_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph mds
dnf:
name: "ceph-mds"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- mds_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph base
yum:
name: "ceph-base"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- client_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph base
dnf:
name: "ceph-base"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- client_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install ceph-test
yum:
name: ceph-test
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- ceph_test
- ansible_pkg_mgr == "yum"
- name: install ceph-test
dnf:
name: ceph-test
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- ceph_test
- ansible_pkg_mgr == "dnf"
- name: install Inktank Ceph Enterprise RBD Kernel modules
yum:
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
- 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
- ansible_pkg_mgr == "dnf"
- name: install rados gateway
yum:
name: ceph-radosgw
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- rgw_group_name in group_names
- ansible_pkg_mgr == "yum"
- name: install rados gateway
dnf:
name: ceph-radosgw
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- rgw_group_name in group_names
- ansible_pkg_mgr == "dnf"
- name: install NFS gateway
yum:
name: nfs-ganesha-ceph
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- nfs_group_name in group_names
- ansible_pkg_mgr == "yum"
- name: install NFS gateway
dnf:
name: nfs-ganesha-ceph
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- nfs_group_name in group_names
- ansible_pkg_mgr == "dnf"