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
|
|
|
|
- ansible_service_mgr == 'systemd'
|
|
|
|
|
|
|
|
- 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
|
|
|
|
- ansible_service_mgr == 'systemd'
|
|
|
|
|
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:
|
|
|
|
name: ceph-mgr@{{ ansible_hostname }}
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2019-03-20 18:35:36 +08:00
|
|
|
masked: no
|
|
|
|
daemon_reload: yes
|