when:
socket.rc == 0 and
ansible_distribution != 'Ubuntu' and
- not use_systemd and
+ use_systemd and
mds_group_name in group_names and
- ceph_stable and
- ceph_stable_release in ceph_stable_releases
+ is_before_infernalis
- name: restart ceph mdss with systemd
service:
socket.rc == 0 and
use_systemd and
mds_group_name in group_names and
- ceph_stable and
- ceph_stable_release not in ceph_stable_releases
+ is_after_hammer
- name: restart ceph rgws on ubuntu
command: initctl restart radosgw cluster={{ cluster }} id=rgw.{{ ansible_hostname }}
- done
- upstart
changed_when: false
- when: ansible_distribution == "Ubuntu"
+ when: not use_systemd
- name: activate metadata server with sysvinit
file:
- done
- sysvinit
changed_when: false
- when: ansible_distribution != "Ubuntu"
+ when: use_systemd
- name: enable systemd unit file for mds instance (for or after infernalis)
file:
changed_when: false
failed_when: false
when:
- ansible_distribution != "Ubuntu" and
+ use_systemd and
is_after_hammer
-- name: start and add that the metadata service to the init sequence (ubuntu)
+- name: start and add that the metadata service to the init sequence (upstart)
command: initctl emit ceph-mds cluster={{ cluster }} id={{ mds_name }}
changed_when: false
failed_when: false
- when: ansible_distribution == "Ubuntu"
+ when: not use_systemd
-- name: start and add that the metadata service to the init sequence (before infernalis)
+- name: start and add that the metadata service to the init sequence (systemd before infernalis)
service:
name: ceph
state: started
args: mds.{{ mds_name }}
changed_when: false
when:
- ansible_distribution != "Ubuntu" and
+ use_systemd and
is_before_infernalis
-- name: start and add that the metadata service to the init sequence (for or after infernalis)
+- name: start and add that the metadata service to the init sequence (systemd after hammer)
service:
name: ceph-mds@{{ mds_name }}
state: started
enabled: yes
changed_when: false
when:
- ansible_distribution != "Ubuntu" and
+ use_systemd and
is_after_hammer