2017-03-16 17:17:08 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set_fact ceph_mgr_packages for sso
|
|
|
|
ansible.builtin.set_fact:
|
2021-03-03 22:43:50 +08:00
|
|
|
ceph_mgr_packages: "{{ ceph_mgr_packages | union(['python3-saml' if ansible_facts['distribution_major_version'] | int == 8 else 'python-saml']) }}"
|
2020-04-04 04:33:11 +08:00
|
|
|
when:
|
|
|
|
- dashboard_enabled | bool
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['distribution'] == 'RedHat'
|
2020-04-04 04:33:11 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set_fact ceph_mgr_packages for dashboard
|
|
|
|
ansible.builtin.set_fact:
|
2020-04-03 03:58:11 +08:00
|
|
|
ceph_mgr_packages: "{{ ceph_mgr_packages | union(['ceph-mgr-dashboard']) }}"
|
|
|
|
when: dashboard_enabled | bool
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set_fact ceph_mgr_packages for non el7 distribution
|
|
|
|
ansible.builtin.set_fact:
|
2020-04-03 03:58:11 +08:00
|
|
|
ceph_mgr_packages: "{{ ceph_mgr_packages | union(['ceph-mgr-diskprediction-local']) }}"
|
|
|
|
when:
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['os_family'] != 'RedHat'
|
|
|
|
- ansible_facts['distribution_major_version'] | int != 7
|
2020-04-03 03:58:11 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Enable crb repository
|
2024-02-13 15:27:35 +08:00
|
|
|
community.general.dnf_config_manager:
|
|
|
|
name: crb
|
|
|
|
state: enabled
|
|
|
|
when:
|
|
|
|
- ansible_facts['os_family'] == 'RedHat'
|
|
|
|
- ansible_facts['distribution_major_version'] | int == 9
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Install ceph-mgr packages on RedHat or SUSE
|
|
|
|
ansible.builtin.package:
|
2019-04-16 00:15:49 +08:00
|
|
|
name: '{{ ceph_mgr_packages }}'
|
2024-02-14 18:14:02 +08:00
|
|
|
state: "{{ (upgrade_ceph_packages | bool) | ternary('latest', 'present') }}"
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2021-03-03 22:43:50 +08:00
|
|
|
when: ansible_facts['os_family'] in ['RedHat', 'Suse']
|
2017-10-09 21:26:15 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Install ceph-mgr packages for debian
|
|
|
|
ansible.builtin.apt:
|
2019-04-16 00:15:49 +08:00
|
|
|
name: '{{ ceph_mgr_packages }}'
|
2024-02-14 18:14:02 +08:00
|
|
|
state: "{{ (upgrade_ceph_packages | bool) | ternary('latest', 'present') }}"
|
2021-03-03 22:43:50 +08:00
|
|
|
default_release: "{{ ceph_stable_release_uca | default('') if ceph_origin == 'repository' and ceph_repository == 'uca' else ''}}{{ ansible_facts['distribution_release'] ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports | bool else '' }}"
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2021-03-03 22:43:50 +08:00
|
|
|
when: ansible_facts['os_family'] == 'Debian'
|
2023-08-16 21:51:03 +08:00
|
|
|
tags: package-install
|