state: restarted
when:
socket.rc == 0 and
- ansible_distribution != 'Ubuntu' and
+ use_systemd and
mon_group_name in group_names and
is_after_hammer
when:
socket.rc == 0 and
ansible_distribution == 'Ubuntu' and
+ not use_systemd and
mon_group_name in group_names
- name: restart ceph osds
state: restarted
when:
socket.rc == 0 and
- ansible_distribution != 'Ubuntu' and
+ use_systemd and
osd_group_name in group_names and
is_after_hammer
when:
socket.rc == 0 and
ansible_distribution == 'Ubuntu' and
+ not use_systemd and
osd_group_name in group_names
- name: restart ceph mdss on ubuntu
when:
socket.rc == 0 and
ansible_distribution == 'Ubuntu' and
+ not use_systemd and
mds_group_name in group_names
- name: restart ceph mdss
when:
socket.rc == 0 and
ansible_distribution != 'Ubuntu' and
+ not use_systemd and
mds_group_name in group_names and
ceph_stable and
ceph_stable_release in ceph_stable_releases
state: restarted
when:
socket.rc == 0 and
- ansible_distribution != 'Ubuntu' and
+ use_systemd and
mds_group_name in group_names and
ceph_stable and
ceph_stable_release not in ceph_stable_releases
when:
socketrgw.rc == 0 and
ansible_distribution == 'Ubuntu' and
+ not use_systemd and
rgw_group_name in group_names
- name: restart ceph rgws
state: restarted
when:
socketrgw.rc == 0 and
- ansible_distribution != 'Ubuntu' and
+ use_systemd and
rgw_group_name in group_names and
is_after_hammer
- set_fact:
init_system={{ init_system.content | b64decode }}
+- set_fact:
+ use_systemd={{ init_system == 'systemd\n' }}
+
# NOTE (leseb/jsaintrocc): You are supposed to quote variables
# that follow colons to avoid confusion with dicts but this
# causes issues with the boolean, so we keep this syntax styling...