2016-04-04 06:35:09 +08:00
|
|
|
---
|
2016-05-06 04:00:47 +08:00
|
|
|
- name: start and add that the rbd mirror service to the init sequence (upstart)
|
2016-04-04 06:35:09 +08:00
|
|
|
command: initctl emit ceph-rbd-mirror cluster={{ cluster }} id={{ ansible_hostname }}
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
2016-05-06 04:00:47 +08:00
|
|
|
when: not use_systemd
|
2016-04-04 06:35:09 +08:00
|
|
|
|
|
|
|
# NOTE (leseb): somehow the service ansible module is messing things up
|
|
|
|
# as a safety measure we run the raw command
|
2016-05-06 04:00:47 +08:00
|
|
|
- name: start and add that the rbd mirror service to the init sequence (systemd before infernalis)
|
2016-04-04 06:35:09 +08:00
|
|
|
command: service ceph start ceph-rbd-mirror
|
|
|
|
changed_when: false
|
|
|
|
when:
|
2016-05-06 04:00:47 +08:00
|
|
|
use_systemd and
|
2016-04-27 22:48:46 +08:00
|
|
|
is_before_infernalis
|
2016-04-04 06:35:09 +08:00
|
|
|
|
2016-05-06 04:00:47 +08:00
|
|
|
- name: enable systemd unit file for the rbd mirror service (systemd after hammer)
|
2016-04-04 06:35:09 +08:00
|
|
|
file:
|
|
|
|
src: /usr/lib/systemd/system/ceph-rbd-mirror@.service
|
|
|
|
dest: "/etc/systemd/system/multi-user.target.wants/ceph-rbd-mirror@{{ ceph_rbd_mirror_local_user }}.service"
|
|
|
|
state: link
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
when:
|
2016-05-06 04:00:47 +08:00
|
|
|
use_systemd and
|
2016-04-27 22:48:46 +08:00
|
|
|
is_after_hammer
|
2016-04-04 06:35:09 +08:00
|
|
|
|
2016-05-06 04:00:47 +08:00
|
|
|
- name: start and add that the rbd mirror service to the init sequence (systemd after hammer)
|
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
|
|
|
|
when:
|
2016-05-06 04:00:47 +08:00
|
|
|
use_systemd and
|
2016-04-27 22:48:46 +08:00
|
|
|
is_after_hammer
|