]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge-cluster: remove support for other init system
authorSébastien Han <seb@redhat.com>
Mon, 3 Dec 2018 21:58:19 +0000 (22:58 +0100)
committerSébastien Han <seb@redhat.com>
Mon, 7 Jan 2019 08:14:10 +0000 (09:14 +0100)
We only support systemd and use the service module anyway.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 3a154fa0ad64f6704a832743571e5d20b84e9813)

infrastructure-playbooks/purge-cluster.yml

index d40353e048515248ba3caa72d2846380fe17960e..baf26e7a084368e8bb2c4563b0c3833ca80e9d5f 100644 (file)
       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
 
     failed_when: false
     when: ansible_service_mgr == 'systemd'
 
+
 - name: purge ceph rgw cluster
 
   vars:
       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
       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
     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
 
     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 }}"
       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: