2015-01-21 01:43:47 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Install ceph mds for debian
|
|
|
|
ansible.builtin.apt:
|
2017-10-09 21:37:51 +08:00
|
|
|
name: ceph-mds
|
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 '' }}"
|
2017-10-09 21:37:51 +08:00
|
|
|
when:
|
|
|
|
- mds_group_name in group_names
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['os_family'] == 'Debian'
|
2018-12-20 17:00:26 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2017-10-09 21:37:51 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Install ceph-mds package on redhat or SUSE/openSUSE
|
|
|
|
ansible.builtin.package:
|
2017-10-09 21:37:51 +08:00
|
|
|
name: "ceph-mds"
|
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
|
2017-10-09 21:37:51 +08:00
|
|
|
when:
|
|
|
|
- mds_group_name in group_names
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['os_family'] in ['Suse', 'RedHat']
|
2017-10-09 21:37:51 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Ensure systemd service override directory exists
|
|
|
|
ansible.builtin.file:
|
2017-07-05 21:47:48 +08:00
|
|
|
state: directory
|
|
|
|
path: "/etc/systemd/system/ceph-mds@.service.d/"
|
2024-02-14 18:14:02 +08:00
|
|
|
mode: "0755"
|
2017-07-05 21:47:48 +08:00
|
|
|
when:
|
|
|
|
- ceph_mds_systemd_overrides is defined
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['service_mgr'] == 'systemd'
|
2017-07-05 21:47:48 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Add ceph-mds systemd service overrides
|
2022-01-13 23:57:50 +08:00
|
|
|
openstack.config_template.config_template:
|
2017-07-05 21:47:48 +08:00
|
|
|
src: "ceph-mds.service.d-overrides.j2"
|
|
|
|
dest: "/etc/systemd/system/ceph-mds@.service.d/ceph-mds-systemd-overrides.conf"
|
|
|
|
config_overrides: "{{ ceph_mds_systemd_overrides | default({}) }}"
|
|
|
|
config_type: "ini"
|
|
|
|
when:
|
|
|
|
- ceph_mds_systemd_overrides is defined
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['service_mgr'] == 'systemd'
|
2017-07-05 21:47:48 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Start and add that the metadata service to the init sequence
|
|
|
|
ansible.builtin.systemd:
|
2021-03-03 22:43:50 +08:00
|
|
|
name: ceph-mds@{{ ansible_facts['hostname'] }}
|
2015-11-21 05:34:29 +08:00
|
|
|
state: started
|
2024-02-14 18:14:02 +08:00
|
|
|
enabled: true
|
|
|
|
masked: false
|
2015-11-21 05:34:29 +08:00
|
|
|
changed_when: false
|