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-09 22:08:33 +08:00
|
|
|
- use_systemd
|
|
|
|
- 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-05-14 02:19:29 +08:00
|
|
|
command: systemctl enable ceph-rbd-mirror@{{ ceph_rbd_mirror_local_user }}
|
2016-04-04 06:35:09 +08:00
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- use_systemd
|
|
|
|
- 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-09 22:08:33 +08:00
|
|
|
- use_systemd
|
|
|
|
- is_after_hammer
|