purge: add iscsi support

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>
pull/3393/head
Guillaume Abrioux 2018-11-29 17:52:18 +01:00 committed by Sébastien Han
parent 82a6b5adec
commit 78116fa6db
1 changed files with 51 additions and 0 deletions

View File

@ -73,6 +73,57 @@
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: