From: Sébastien Han Date: Mon, 3 Dec 2018 21:58:19 +0000 (+0100) Subject: purge-cluster: remove support for other init system X-Git-Tag: v4.0.0beta1~111 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3a154fa0ad64f6704a832743571e5d20b84e9813;p=ceph-ansible.git purge-cluster: remove support for other init system We only support systemd and use the service module anyway. Signed-off-by: Sébastien Han --- diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index ccc8e6b0c..510acb178 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -68,16 +68,7 @@ state: stopped enabled: no failed_when: false - when: ansible_service_mgr == 'systemd' - - - name: stop ceph mdss - shell: "service ceph status mds ; if [ $? == 0 ] ; then service ceph stop mds ; else echo ; fi" - when: ansible_service_mgr == 'sysvinit' - - name: stop ceph mdss on ubuntu - command: initctl stop ceph-mds cluster={{ cluster }} id={{ ansible_hostname }} - failed_when: false - when: ansible_service_mgr == 'upstart' - name: purge ceph mgr cluster @@ -101,6 +92,7 @@ failed_when: false when: ansible_service_mgr == 'systemd' + - name: purge ceph rgw cluster vars: @@ -121,16 +113,6 @@ state: stopped enabled: no failed_when: false - when: ansible_service_mgr == 'systemd' - - - name: stop ceph rgws - shell: "service ceph-radosgw status ; if [ $? == 0 ] ; then service ceph-radosgw stop ; else echo ; fi" - when: ansible_service_mgr == 'sysvinit' - - - name: stop ceph rgws on ubuntu - command: initctl stop radosgw cluster={{ cluster }} id={{ ansible_hostname }} - failed_when: false - when: ansible_service_mgr == 'upstart' - name: purge ceph rbd-mirror cluster @@ -152,12 +134,6 @@ name: ceph-rbd-mirror@admin.service state: stopped failed_when: false - when: ansible_service_mgr == 'systemd' - - - name: stop ceph rbd mirror on ubuntu - command: initctl stop ceph-rbd-mirror cluster={{ cluster }} id=admin - failed_when: false - when: ansible_service_mgr == 'upstart' - name: purge ceph nfs cluster @@ -181,15 +157,6 @@ failed_when: false when: ansible_service_mgr == 'systemd' - - name: stop ceph nfss - shell: "service nfs-ganesha status ; if [ $? == 0 ] ; then service nfs-ganesha stop ; else echo ; fi" - when: ansible_service_mgr == 'sysvinit' - - - name: stop ceph nfss on ubuntu - command: initctl stop nfs-ganesha - failed_when: false - when: ansible_service_mgr == 'upstart' - - name: purge ceph osd cluster @@ -244,20 +211,6 @@ with_items: "{{ osd_ids.stdout_lines }}" when: ansible_service_mgr == 'systemd' - # before infernalis release, using sysvinit scripts - # we use this test so we do not have to know which RPM contains the boot script - # or where it is placed. - - - name: stop ceph osds - shell: "service ceph status osd ; if [ $? == 0 ] ; then service ceph stop osd ; else echo ; fi" - when: ansible_service_mgr == 'sysvinit' - - - name: stop ceph osds on ubuntu - command: initctl stop ceph-osd cluster={{ cluster }} id={{ item }} - failed_when: false - when: ansible_service_mgr == 'upstart' - with_items: "{{ osd_ids.stdout_lines }}" - - name: remove ceph udev rules file: path: "{{ item }}" @@ -463,16 +416,7 @@ state: stopped enabled: no failed_when: false - when: ansible_service_mgr == 'systemd' - - name: stop ceph mons - shell: "service ceph status mon ; if [ $? == 0 ] ; then service ceph stop mon ; else echo ; fi" - when: ansible_service_mgr == 'sysvinit' - - - name: stop ceph mons on ubuntu - command: initctl stop ceph-mon cluster={{ cluster }} id={{ ansible_hostname }} - failed_when: false - when: ansible_service_mgr == 'upstart' - name: remove monitor store and bootstrap keys file: