]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fix restart on config change handler 111/head
authorSébastien Han <sebastien.han@enovance.com>
Sat, 30 Aug 2014 00:34:11 +0000 (02:34 +0200)
committerSébastien Han <sebastien.han@enovance.com>
Sat, 30 Aug 2014 00:34:11 +0000 (02:34 +0200)
Prior to this patch, the first match was winning and the playbook wasn't
doing any difference both "restart ceph", adding a distro filtrer fixes
this.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
roles/ceph-common/handlers/main.yml
roles/ceph-common/tasks/Debian.yml
roles/ceph-common/tasks/RedHat.yml

index 44be529ad8a31d87efad0845369a8b3d455f3d04..7de099f7c59e0b8b079e59e800fd1d812d522b5f 100644 (file)
@@ -3,10 +3,10 @@
 - name: "update apt cache"
   action: apt update-cache=yes
 
-- name: "restart ceph"
+- name: "restart ceph ubuntu"
   shell: service ceph restart ; service ceph-osd-all restart
-  when: socket.rc == 0 and ansible_distribution == 'Ubuntu'
+  when: socket.rc == 0
 
-- name: "restart ceph"
+- name: "restart ceph debian redhat"
   command: service ceph restart
-  when: socket.rc == 0 and ansible_distribution == 'Debian' or ansible_os_family == 'RedHat'
+  when: socket.rc == 0
index c4ceaf353e54eb3d6dce1874d0d5e238767b551e..4bddb8bc9cb9dd584d177e1858b14f926a3d7b80 100644 (file)
 
 - name: Generate Ceph configuration file
   template: src=ceph.conf.j2 dest=/etc/ceph/ceph.conf owner=root group=root mode=0644
-  notify: restart ceph
+  notify: restart ceph ubuntu
+  when: ansible_distribution == 'Ubuntu'
+
+- name: Generate Ceph configuration file
+  template: src=ceph.conf.j2 dest=/etc/ceph/ceph.conf owner=root group=root mode=0644
+  notify: restart ceph debian redhat
+  when: ansible_distribution == 'Debian' or ansible_os_family == 'RedHat'
 
 - name: Disable OSD directory parsing by updatedb
   command: updatedb -e /var/lib/ceph
index eddcb52743db620f808221565399611f31ded568..02c9069f7e85357e9fb05af90f74f03d1a63899c 100644 (file)
@@ -37,7 +37,7 @@
 
 - name: Generate Ceph configuration file
   template: src=ceph.conf.j2 dest=/etc/ceph/ceph.conf owner=root group=root mode=0644
-  notify: restart ceph
+  notify: restart ceph debian redhat
 
 - name: Disable OSD directory parsing by updatedb
   command: updatedb -e /var/lib/ceph