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
|
2016-09-22 23:03:14 +08:00
|
|
|
when: ansible_os_family == 'Debian'
|
2014-03-04 02:08:51 +08:00
|
|
|
|
2017-04-04 01:55:11 +08:00
|
|
|
- block:
|
|
|
|
- name: copy mon restart script
|
|
|
|
template:
|
|
|
|
src: restart_mon_daemon.sh.j2
|
|
|
|
dest: /tmp/restart_mon_daemon.sh
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0750
|
|
|
|
listen: "restart ceph mons"
|
2014-08-20 20:04:34 +08:00
|
|
|
|
2017-04-04 01:55:11 +08:00
|
|
|
- name: restart ceph mon daemon(s)
|
|
|
|
command: /tmp/restart_mon_daemon.sh
|
|
|
|
listen: "restart ceph mons"
|
|
|
|
|
|
|
|
when:
|
|
|
|
- mon_group_name in group_names
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
- block:
|
|
|
|
- name: copy osd restart script
|
|
|
|
template:
|
|
|
|
src: restart_osd_daemon.sh.j2
|
|
|
|
dest: /tmp/restart_osd_daemon.sh
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0750
|
|
|
|
listen: "restart ceph osds"
|
|
|
|
|
|
|
|
- name: restart ceph osds daemon(s)
|
|
|
|
command: /tmp/restart_osd_daemon.sh
|
|
|
|
listen: "restart ceph osds"
|
|
|
|
when:
|
|
|
|
- handler_health_osd_check
|
|
|
|
when:
|
|
|
|
- osd_group_name in group_names
|
2015-07-01 00:07:03 +08:00
|
|
|
|
2015-03-03 00:13:30 +08:00
|
|
|
- name: restart ceph mdss
|
2017-04-04 01:55:11 +08:00
|
|
|
service:
|
|
|
|
name: ceph-mds@{{ mds_name }}
|
|
|
|
state: restarted
|
|
|
|
# serial: 1 would be the proper solution here, but that can only be set on play level
|
|
|
|
# upstream issue: https://github.com/ansible/ansible/issues/12170
|
|
|
|
run_once: true
|
|
|
|
with_items: "{{ groups.get(mds_group_name, []) }}"
|
|
|
|
delegate_to: "{{ item }}"
|
|
|
|
when:
|
|
|
|
- mds_group_name in group_names
|
2015-07-01 00:07:03 +08:00
|
|
|
|
2015-03-03 00:13:30 +08:00
|
|
|
- name: restart ceph rgws
|
2017-04-04 01:55:11 +08:00
|
|
|
service:
|
|
|
|
name: ceph-radosgw@rgw.{{ ansible_hostname }}
|
|
|
|
state: restarted
|
|
|
|
# serial: 1 would be the proper solution here, but that can only be set on play level
|
|
|
|
# upstream issue: https://github.com/ansible/ansible/issues/12170
|
|
|
|
run_once: true
|
|
|
|
with_items: "{{ groups.get(rgw_group_name, []) }}"
|
|
|
|
delegate_to: "{{ item }}"
|
|
|
|
when:
|
|
|
|
- rgw_group_name in group_names
|
2015-08-03 23:39:57 +08:00
|
|
|
|
2016-05-06 02:20:03 +08:00
|
|
|
- name: restart ceph nfss
|
|
|
|
service:
|
|
|
|
name: nfs-ganesha
|
|
|
|
state: restarted
|
|
|
|
when:
|
|
|
|
- nfs_group_name in group_names
|