ceph-ansible/roles/ceph-common/handlers/main.yml

47 lines
1003 B
YAML
Raw Normal View History

---
2014-09-05 03:14:11 +08:00
- name: update apt cache
2015-09-04 00:18:53 +08:00
apt:
update-cache: yes
- name: restart ceph mons
service:
name: ceph-mon@{{ monitor_name }}
state: restarted
when:
- socket.rc == 0
- 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.
- name: restart ceph osds
service:
name: ceph.target
state: restarted
when:
- socket.rc == 0
- osd_group_name in group_names
- name: restart ceph mdss
service:
name: ceph-mds@{{ mds_name }}
state: restarted
when:
- socket.rc == 0
- mds_group_name in group_names
- name: restart ceph rgws
service:
name: ceph-rgw@{{ ansible_hostname }}
state: restarted
when:
- socketrgw.rc == 0
- rgw_group_name in group_names
- name: restart ceph nfss
service:
name: nfs-ganesha
state: restarted
when:
- nfs_group_name in group_names