2018-12-03 18:15:30 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Ensure systemd service override directory exists
|
|
|
|
ansible.builtin.file:
|
2018-12-03 18:15:30 +08:00
|
|
|
state: directory
|
|
|
|
path: "/etc/systemd/system/ceph-mgr@.service.d/"
|
2024-02-14 18:14:02 +08:00
|
|
|
mode: "0755"
|
2018-12-03 18:15:30 +08:00
|
|
|
when:
|
|
|
|
- ceph_mgr_systemd_overrides is defined
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['service_mgr'] == 'systemd'
|
2018-12-03 18:15:30 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Add ceph-mgr systemd service overrides
|
2022-01-13 23:57:50 +08:00
|
|
|
openstack.config_template.config_template:
|
2018-12-03 18:15:30 +08:00
|
|
|
src: "ceph-mgr.service.d-overrides.j2"
|
|
|
|
dest: "/etc/systemd/system/ceph-mgr@.service.d/ceph-mgr-systemd-overrides.conf"
|
|
|
|
config_overrides: "{{ ceph_mgr_systemd_overrides | default({}) }}"
|
|
|
|
config_type: "ini"
|
|
|
|
when:
|
|
|
|
- ceph_mgr_systemd_overrides is defined
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['service_mgr'] == 'systemd'
|
2018-12-03 18:15:30 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Include_tasks systemd.yml
|
|
|
|
ansible.builtin.include_tasks: systemd.yml
|
2019-05-22 16:02:42 +08:00
|
|
|
when: containerized_deployment | bool
|
2018-12-03 18:15:30 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Enable ceph-mgr.target
|
|
|
|
ansible.builtin.service:
|
2021-08-10 21:21:19 +08:00
|
|
|
name: ceph-mgr.target
|
2024-02-14 18:14:02 +08:00
|
|
|
enabled: true
|
|
|
|
daemon_reload: true
|
2021-08-10 21:21:19 +08:00
|
|
|
when: containerized_deployment | bool
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Systemd start mgr
|
|
|
|
ansible.builtin.systemd:
|
2021-03-03 22:43:50 +08:00
|
|
|
name: ceph-mgr@{{ ansible_facts['hostname'] }}
|
2018-12-03 18:15:30 +08:00
|
|
|
state: started
|
2024-02-14 18:14:02 +08:00
|
|
|
enabled: true
|
|
|
|
masked: false
|
|
|
|
daemon_reload: true
|