Merge pull request #106 from leseb/restart-daemons-on-config-change

Restart Ceph service after a configuration change
pull/108/head
Leseb 2014-08-20 14:50:26 +02:00
commit e2599556b9
3 changed files with 21 additions and 1 deletions

View File

@ -2,3 +2,11 @@
- name: "update apt cache"
action: apt update-cache=yes
- name: "restart ceph"
shell: service ceph restart ; service ceph-osd-all restart
when: socket.rc == 0 and ansible_distribution == 'Ubuntu'
- name: "restart ceph"
command: service ceph restart
when: socket.rc == 0 and ansible_distribution == 'Debian' or ansible_os_family == 'RedHat'

View File

@ -37,5 +37,11 @@
- ceph-mds #|--> they don't get update so we need to force them
- libcephfs1 #|
- name: Generate ceph configuration file
- name: Check for a Ceph socket
shell: stat /var/run/ceph/*.asok > /dev/null 2>&1
ignore_errors: true
register: socket
- name: Generate Ceph configuration file
template: src=ceph.conf.j2 dest=/etc/ceph/ceph.conf owner=root group=root mode=0644
notify: restart ceph

View File

@ -30,5 +30,11 @@
- name: Install Ceph
yum: name=ceph state=latest
- name: Check for a Ceph socket
shell: stat /var/run/ceph/*.asok > /dev/null 2>&1
ignore_errors: true
register: socket
- name: Generate Ceph configuration file
template: src=ceph.conf.j2 dest=/etc/ceph/ceph.conf owner=root group=root mode=0644
notify: restart ceph