blob: ed887c6fce899f9ca044f77901e2b4ef890d1cff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# 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
|