Merge pull request #222 from leseb/improve-handlers

Improve Handler support
pull/223/head
Leseb 2015-03-02 17:16:32 +01:00
commit c0ce7dd754
2 changed files with 23 additions and 8 deletions

View File

@ -2,10 +2,22 @@
- name: update apt cache
apt: update-cache=yes
- name: restart ceph
command: service ceph restart
when: socket.rc == 0
- name: restart ceph mons
command: service ceph restart mon
when: socket.rc == 0 and 'mons' in group_names
- name: restart ceph-osd-all on ubuntu
shell: service ceph restart ; service ceph-osd-all restart
when: socket.rc == 0 and ansible_distribution == 'Ubuntu'
- name: restart ceph osds
command: service ceph restart osd
when: socket.rc == 0 and 'osds' in group_names
- name: restart ceph osds on ubuntu
command: restart ceph-osd-all
when: socket.rc == 0 and ansible_distribution == 'Ubuntu' and 'osds' in group_names
- name: restart ceph mdss
command: service ceph restart mds
when: socket.rc == 0 and 'mdss' in group_names
- name: restart ceph rgws
command: /etc/init.d/radosgw restart
when: socket.rc == 0 and 'rgws' in group_names

View File

@ -37,5 +37,8 @@
group=root
mode=0644
notify:
- restart ceph
- restart ceph-osd-all on ubuntu
- restart ceph mons
- restart ceph osds
- restart ceph osds on ubuntu
- restart ceph mdss
- restart ceph rgws