2018-12-03 18:15:30 +08:00
|
|
|
---
|
|
|
|
- name: ensure systemd service override directory exists
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: "/etc/systemd/system/ceph-mgr@.service.d/"
|
|
|
|
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
|
|
|
|
|
|
|
- name: add ceph-mgr systemd service overrides
|
|
|
|
config_template:
|
|
|
|
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
|
|
|
|
2019-07-24 16:10:18 +08:00
|
|
|
- name: include_tasks systemd.yml
|
|
|
|
include_tasks: systemd.yml
|
2019-05-22 16:02:42 +08:00
|
|
|
when: containerized_deployment | bool
|
2018-12-03 18:15:30 +08:00
|
|
|
|
|
|
|
- name: systemd start mgr
|
|
|
|
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
|
|
|
|
enabled: yes
|
2019-03-20 18:35:36 +08:00
|
|
|
masked: no
|
|
|
|
daemon_reload: yes
|