From 14e957dfec18ad6806bf610988b538b4ce0e0971 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Thu, 24 Mar 2016 11:37:35 +0100 Subject: [PATCH] purge-cluster: make stop service work on ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit reworked the stop sequence by using ids instead of calling the 'all' function which does not seem to be working all the time. Signed-off-by: Sébastien Han --- purge-cluster.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/purge-cluster.yml b/purge-cluster.yml index 5841bdba1..0ac58b681 100644 --- a/purge-cluster.yml +++ b/purge-cluster.yml @@ -90,8 +90,8 @@ osd_group_name in group_names - name: stop ceph mons with systemd - service: - name: ceph-mon@{{ ansible_hostname }} + service: + name: ceph-mon@{{ ansible_hostname }} state: stopped enabled: no when: @@ -100,8 +100,8 @@ mon_group_name in group_names - name: stop ceph mdss with systemd - service: - name: ceph-mds@{{ ansible_hostname }} + service: + name: ceph-mds@{{ ansible_hostname }} state: stopped when: ansible_os_family == 'RedHat' and @@ -132,19 +132,20 @@ # Ubuntu 14.04 - name: stop ceph osds on ubuntu - command: stop ceph-osd-all + command: stop ceph-osd id={{ item }} failed_when: false when: ansible_distribution == 'Ubuntu' and osd_group_name in group_names + with_items: "{{ osd_ids.stdout_lines }}" - name: stop ceph mons on ubuntu - command: stop ceph-mon-all + command: stop ceph-mon id={{ ansible_hostname }} failed_when: false when: ansible_distribution == 'Ubuntu' and mon_group_name in group_names - + - name: stop ceph mdss on ubuntu command: stop ceph-mds-all failed_when: false -- 2.39.5