]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge: add iscsi support
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 29 Nov 2018 16:52:18 +0000 (17:52 +0100)
committerSébastien Han <seb@redhat.com>
Tue, 4 Dec 2018 17:04:13 +0000 (18:04 +0100)
add iscsi support for both non containerized and containerized
deployment in purge playbooks.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1651054
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 78116fa6dbe269d1319213251b01e43f1b8f3cff)

infrastructure-playbooks/purge-docker-cluster.yml

index 5700853349c545788e5ea9c041e8383cdcd385cb..615c990afe571a413de66ea9385282ae432e7907 100644 (file)
       remove_img
     ignore_errors: true
 
+- name: purge ceph iscsigws cluster
+
+  hosts:
+    - "{{ iscsi_gw_group_name|default('iscsigws') }}"
+    - iscsi-gws
+  become: true
+  tasks:
+
+  - name: disable ceph iscsigw services
+    service:
+      name: "{{ item }}"
+      state: stopped
+      enabled: no
+    ignore_errors: true
+    with_items:
+      - rbd-target-api
+      - rbd-target-gw
+      - tcmu-runner
+
+  - name: remove ceph iscsigw containers
+    docker_container:
+      image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
+      name: "{{ item }}"
+      state: absent
+    ignore_errors: true
+    with_items:
+      - rbd-target-api
+      - rbd-target-gw
+      - tcmu-runner
+
+  - name: remove ceph iscsigw systemd unit files
+    file:
+      path: /etc/systemd/system/{{ item }}.service
+      state: absent
+    ignore_errors: true
+    with_items:
+      - rbd-target-api
+      - rbd-target-gw
+      - tcmu-runner
+
+  - name: remove ceph iscsigw image
+    docker_image:
+      state: absent
+      repository: "{{ ceph_docker_registry }}"
+      name: "{{ ceph_docker_image }}"
+      tag: "{{ ceph_docker_image_tag }}"
+      force: yes
+    tags:
+      remove_img
+    ignore_errors: true
+
 - name: purge ceph mgr cluster
 
   hosts: