2016-04-04 06:35:09 +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-rbd-mirror@.service.d/"
|
|
|
|
when:
|
|
|
|
- ceph_rbd_mirror_systemd_overrides is defined
|
|
|
|
- ansible_service_mgr == 'systemd'
|
|
|
|
|
|
|
|
- name: add ceph-rbd-mirror systemd service overrides
|
|
|
|
config_template:
|
|
|
|
src: "ceph-rbd-mirror.service.d-overrides.j2"
|
|
|
|
dest: "/etc/systemd/system/ceph-rbd-mirror@.service.d/ceph-rbd-mirror-systemd-overrides.conf"
|
|
|
|
config_overrides: "{{ ceph_rbd_mirror_systemd_overrides | default({}) }}"
|
|
|
|
config_type: "ini"
|
|
|
|
when:
|
|
|
|
- ceph_rbd_mirror_systemd_overrides is defined
|
|
|
|
- ansible_service_mgr == 'systemd'
|
|
|
|
|
2017-01-20 17:14:35 +08:00
|
|
|
- name: start and add that the rbd mirror service to the init sequence
|
2016-04-04 06:35:09 +08:00
|
|
|
service:
|
|
|
|
name: "ceph-rbd-mirror@{{ ceph_rbd_mirror_local_user }}"
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
changed_when: false
|