2014-03-04 02:08:51 +08:00
|
|
|
---
|
2014-09-05 03:14:11 +08:00
|
|
|
- name: update apt cache
|
2015-09-04 00:18:53 +08:00
|
|
|
apt:
|
|
|
|
update-cache: yes
|
2014-03-04 02:08:51 +08:00
|
|
|
|
2015-03-03 00:13:30 +08:00
|
|
|
- name: restart ceph mons
|
|
|
|
command: service ceph restart mon
|
2015-06-26 06:26:03 +08:00
|
|
|
when:
|
2015-08-07 13:07:51 +08:00
|
|
|
socket.rc == 0 and
|
2015-07-01 00:07:03 +08:00
|
|
|
ansible_distribution != 'Ubuntu' and
|
2015-11-20 22:09:34 +08:00
|
|
|
mon_group_name in group_names and not
|
|
|
|
is_ceph_infernalis
|
2015-11-21 05:34:29 +08:00
|
|
|
|
|
|
|
- name: restart ceph mons with systemd
|
|
|
|
service:
|
|
|
|
name: ceph-mon@{{ ansible_hostname }}
|
|
|
|
state: restarted
|
|
|
|
when:
|
|
|
|
socket.rc == 0 and
|
|
|
|
ansible_distribution != 'Ubuntu' and
|
2015-11-20 22:09:34 +08:00
|
|
|
mon_group_name in group_names and
|
|
|
|
is_ceph_infernalis
|
2015-07-01 00:07:03 +08:00
|
|
|
|
|
|
|
- name: restart ceph mons on ubuntu
|
|
|
|
command: restart ceph-mon-all
|
|
|
|
when:
|
2015-08-07 13:07:51 +08:00
|
|
|
socket.rc == 0 and
|
2015-07-01 00:07:03 +08:00
|
|
|
ansible_distribution == 'Ubuntu' and
|
2015-06-26 21:10:50 +08:00
|
|
|
mon_group_name in group_names
|
2014-08-20 20:04:34 +08:00
|
|
|
|
2015-03-03 00:13:30 +08:00
|
|
|
- name: restart ceph osds
|
|
|
|
command: service ceph restart osd
|
2015-06-26 06:26:03 +08:00
|
|
|
when:
|
2015-08-07 13:07:51 +08:00
|
|
|
socket.rc == 0 and
|
2015-07-01 00:07:03 +08:00
|
|
|
ansible_distribution != 'Ubuntu' and
|
2015-11-21 05:34:29 +08:00
|
|
|
osd_group_name in group_names and
|
2015-11-20 22:09:34 +08:00
|
|
|
not is_ceph_infernalis
|
2015-11-21 05:34:29 +08:00
|
|
|
|
|
|
|
# This does not just restart OSDs but everything else too. Unfortunately
|
|
|
|
# at this time the ansible role does not have an OSD id list to use
|
|
|
|
# for restarting them specifically.
|
|
|
|
- name: restart ceph osds with systemd
|
|
|
|
service:
|
|
|
|
name: ceph.target
|
|
|
|
state: restarted
|
|
|
|
when:
|
|
|
|
socket.rc == 0 and
|
|
|
|
ansible_distribution != 'Ubuntu' and
|
2015-11-20 22:09:34 +08:00
|
|
|
osd_group_name in group_names and
|
|
|
|
is_ceph_infernalis
|
2015-03-03 00:13:30 +08:00
|
|
|
|
|
|
|
- name: restart ceph osds on ubuntu
|
|
|
|
command: restart ceph-osd-all
|
2015-06-26 06:26:03 +08:00
|
|
|
when:
|
2015-08-07 13:07:51 +08:00
|
|
|
socket.rc == 0 and
|
2015-06-26 06:26:03 +08:00
|
|
|
ansible_distribution == 'Ubuntu' and
|
2015-06-26 21:10:50 +08:00
|
|
|
osd_group_name in group_names
|
2015-03-03 00:13:30 +08:00
|
|
|
|
2015-07-01 00:07:03 +08:00
|
|
|
- name: restart ceph mdss on ubuntu
|
|
|
|
command: restart ceph-mds-all
|
|
|
|
when:
|
2015-08-07 13:07:51 +08:00
|
|
|
socket.rc == 0 and
|
2015-07-01 00:07:03 +08:00
|
|
|
ansible_distribution == 'Ubuntu' and
|
|
|
|
mds_group_name in group_names
|
|
|
|
|
2015-03-03 00:13:30 +08:00
|
|
|
- name: restart ceph mdss
|
|
|
|
command: service ceph restart mds
|
2015-06-26 06:26:03 +08:00
|
|
|
when:
|
2015-08-07 13:07:51 +08:00
|
|
|
socket.rc == 0 and
|
2015-07-01 00:07:03 +08:00
|
|
|
ansible_distribution != 'Ubuntu' and
|
2015-11-21 05:34:29 +08:00
|
|
|
mds_group_name in group_names and
|
2015-11-20 22:09:34 +08:00
|
|
|
ceph_stable and
|
|
|
|
ceph_stable_release in ceph_stable_releases
|
2015-11-21 05:34:29 +08:00
|
|
|
|
|
|
|
- name: restart ceph mdss with systemd
|
|
|
|
service:
|
|
|
|
name: ceph-mds@{{ ansible_hostname }}
|
|
|
|
state: restarted
|
|
|
|
when:
|
|
|
|
socket.rc == 0 and
|
|
|
|
ansible_distribution != 'Ubuntu' and
|
2015-11-20 22:09:34 +08:00
|
|
|
mds_group_name in group_names and
|
|
|
|
ceph_stable and
|
|
|
|
ceph_stable_release not in ceph_stable_releases
|
2015-03-03 00:13:30 +08:00
|
|
|
|
2015-07-01 00:07:03 +08:00
|
|
|
- name: restart ceph rgws on ubuntu
|
|
|
|
command: restart ceph-all
|
|
|
|
when:
|
2015-08-07 13:07:51 +08:00
|
|
|
socketrgw.rc == 0 and
|
2015-07-01 00:07:03 +08:00
|
|
|
ansible_distribution == 'Ubuntu' and
|
|
|
|
rgw_group_name in group_names
|
|
|
|
|
2015-03-03 00:13:30 +08:00
|
|
|
- name: restart ceph rgws
|
|
|
|
command: /etc/init.d/radosgw restart
|
2015-06-26 06:26:03 +08:00
|
|
|
when:
|
2015-08-07 13:07:51 +08:00
|
|
|
socketrgw.rc == 0 and
|
2015-07-01 00:07:03 +08:00
|
|
|
ansible_distribution != 'Ubuntu' and
|
2015-11-21 05:34:29 +08:00
|
|
|
rgw_group_name in group_names and
|
2015-11-20 22:09:34 +08:00
|
|
|
not is_ceph_infernalis
|
2015-07-01 00:07:03 +08:00
|
|
|
|
|
|
|
- name: restart ceph rgws on red hat
|
|
|
|
command: /etc/init.d/ceph-radosgw restart
|
|
|
|
when:
|
2015-08-07 13:07:51 +08:00
|
|
|
socketrgw.rc == 0 and
|
2015-07-01 00:07:03 +08:00
|
|
|
ansible_os_family == 'RedHat' and
|
2015-11-21 05:34:29 +08:00
|
|
|
rgw_group_name in group_names and
|
2015-11-20 22:09:34 +08:00
|
|
|
not is_ceph_infernalis
|
2015-11-21 05:34:29 +08:00
|
|
|
|
|
|
|
- name: restart ceph rgws with systemd
|
|
|
|
service:
|
|
|
|
name: ceph-rgw@{{ ansible_hostname }}
|
|
|
|
state: restarted
|
|
|
|
when:
|
|
|
|
socketrgw.rc == 0 and
|
|
|
|
ansible_distribution != 'Ubuntu' and
|
2015-11-20 22:09:34 +08:00
|
|
|
rgw_group_name in group_names and
|
|
|
|
is_ceph_infernalis
|
2015-08-03 23:39:57 +08:00
|
|
|
|
|
|
|
- name: restart apache2
|
2015-09-04 00:18:53 +08:00
|
|
|
service:
|
|
|
|
name: apache2
|
|
|
|
state: restarted
|
|
|
|
enabled: yes
|
2015-08-03 23:39:57 +08:00
|
|
|
when:
|
|
|
|
ansible_os_family == 'Debian' and
|
|
|
|
rgw_group_name in group_names
|
|
|
|
|
|
|
|
- name: restart apache2
|
2015-09-04 00:18:53 +08:00
|
|
|
service:
|
|
|
|
name: httpd
|
|
|
|
state: restarted
|
|
|
|
enabled: yes
|
2015-08-03 23:39:57 +08:00
|
|
|
when:
|
|
|
|
ansible_os_family == 'RedHat' and
|
|
|
|
rgw_group_name in group_names
|