2015-03-26 22:43:54 +08:00
|
|
|
---
|
2017-07-05 21:47:48 +08:00
|
|
|
- name: ensure systemd service override directory exists
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: "/etc/systemd/system/ceph-mon@.service.d/"
|
|
|
|
when:
|
2019-05-22 16:02:42 +08:00
|
|
|
- not containerized_deployment | bool
|
2017-07-05 21:47:48 +08:00
|
|
|
- ceph_mon_systemd_overrides is defined
|
|
|
|
- ansible_service_mgr == 'systemd'
|
|
|
|
|
|
|
|
- name: add ceph-mon systemd service overrides
|
|
|
|
config_template:
|
|
|
|
src: "ceph-mon.service.d-overrides.j2"
|
|
|
|
dest: "/etc/systemd/system/ceph-mon@.service.d/ceph-mon-systemd-overrides.conf"
|
|
|
|
config_overrides: "{{ ceph_mon_systemd_overrides | default({}) }}"
|
|
|
|
config_type: "ini"
|
|
|
|
when:
|
2019-05-22 16:02:42 +08:00
|
|
|
- not containerized_deployment | bool
|
2017-07-05 21:47:48 +08:00
|
|
|
- ceph_mon_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
|
2017-03-29 11:11:04 +08:00
|
|
|
|
2018-11-16 17:50:38 +08:00
|
|
|
- name: start the monitor service
|
2017-03-29 11:11:04 +08:00
|
|
|
systemd:
|
2020-09-26 00:15:02 +08:00
|
|
|
name: ceph-mon@{{ monitor_name if not containerized_deployment | bool else ansible_hostname }}
|
2018-11-16 17:50:38 +08:00
|
|
|
state: started
|
2017-03-29 11:11:04 +08:00
|
|
|
enabled: yes
|
2019-03-20 18:35:36 +08:00
|
|
|
masked: no
|
|
|
|
daemon_reload: yes
|