# Copyright (c) 2018 Huawei Technologies Co., Ltd. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - name: kill osdslet daemon service shell: killall osdslet osdsdock when: install_from != "container" ignore_errors: true - name: kill osdslet containerized service docker_container: name: osdslet image: "{{ controller_docker_image }}" state: stopped when: install_from == "container" - name: kill osdsdock containerized service docker_container: name: osdsdock image: "{{ dock_docker_image }}" state: stopped when: install_from == "container" - name: stop container where dashboard is located docker_container: name: dashboard image: "{{ dashboard_docker_image }}" state: stopped when: dashboard_installation_type == "container" - name: clean opensds flexvolume plugins binary file if flexvolume specified file: path: "{{ flexvolume_plugin_dir }}" state: absent force: yes ignore_errors: yes when: nbp_plugin_type == "flexvolume" - name: clean opensds external provisioner plugin if flexvolume specified shell: | . /etc/profile kubectl delete -f deploy/ args: chdir: "{{ nbp_work_dir }}/provisioner" ignore_errors: yes when: nbp_plugin_type == "flexvolume" - name: clean opensds csi plugin if csi plugin specified shell: | . /etc/profile kubectl delete -f deploy/kubernetes args: chdir: "{{ nbp_work_dir }}/csi" ignore_errors: yes when: nbp_plugin_type == "csi" - name: clean all configuration and log files in opensds and nbp work directory file: path: "{{ item }}" state: absent force: yes with_items: - "{{ opensds_work_dir }}" - "{{ nbp_work_dir }}" - "{{ opensds_config_dir }}" - "{{ opensds_log_dir }}" ignore_errors: yes - name: include scenarios/auth-keystone.yml when specifies keystone include_tasks: scenarios/auth-keystone.yml when: opensds_auth_strategy == "keystone" - name: include scenarios/repository.yml if installed from repository include_tasks: scenarios/repository.yml when: install_from == "repository" or dashboard_installation_type == "source_code" - name: include scenarios/release.yml if installed from release include_tasks: scenarios/release.yml when: install_from == "release" - name: include scenarios/backend.yml for cleaning up storage backend service include_tasks: scenarios/backend.yml