fba5576af067ea2fe7e515e631823d35d2ab2ddf
[ealt-edge.git] / ocd / infra / playbooks / roles / eg_mep / tasks / uninstall.yml
1 # Copyright 2020 Huawei Technologies Co., Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15
16 ---
17
18 - name: Uninstall ssl config mep helm chart
19   command: helm uninstall mep-edgegallery
20   ignore_errors: yes
21   no_log: True
22
23 - name: Delete ssl config pg secret
24   command: kubectl delete secret pg-secret -n mep
25   ignore_errors: yes
26   no_log: True
27
28 - name: Delete ssl config mep ssl
29   command: kubectl delete secret mep-ssl -n mep
30   ignore_errors: yes
31   no_log: True
32
33 - name: Delete ssl config mep mep auth
34   command: kubectl delete secret mepauth-secret -n mep
35   ignore_errors: yes
36   no_log: True
37
38 - name: Delete ssl config namesapce mep
39   command: kubectl delete ns mep
40   ignore_errors: yes
41   no_log: True
42
43 - name: Delete network isolation multus eg sp controller
44   # yamllint disable rule:line-length
45   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/network-isolation/eg-sp-controller.yaml
46   ignore_errors: yes
47   no_log: True
48
49 - name: Delete network isolation multus eg sp rbac
50   # yamllint disable rule:line-length
51   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/network-isolation/eg-sp-rbac.yaml
52   ignore_errors: yes
53   no_log: True
54
55 - name: Delete network isolation multus
56   # yamllint disable rule:line-length
57   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/network-isolation/multus.yaml
58   ignore_errors: yes
59   no_log: True
60
61 - name: Delete network isolation eg mp1
62   command: ip link set dev eg-mp1 down
63   ignore_errors: yes
64   no_log: True
65
66 - name: Delete nnetwork isolation eg mp1 link
67   command: ip link delete eg-mp1
68   ignore_errors: yes
69   no_log: True
70
71 - name: Delete network isolation eg mm5
72   command: ip link set dev eg-mm5 down
73   ignore_errors: yes
74   no_log: True
75
76 - name: Delete network isolation eg mm5 link
77   command: ip link delete eg-mm5
78   ignore_errors: yes
79   no_log: True
80
81 - name: Delete network isolation multus rm
82   command: rm -rf /opt/cni/bin/multus
83   ignore_errors: yes
84   no_log: True
85
86 - name: Uninstall dns metallb config mep
87   # yamllint disable rule:line-length
88   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/metallb/config-map.yaml
89   ignore_errors: yes
90   no_log: True
91
92 - name: Delete dns metallb
93   # yamllint disable rule:line-length
94   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/metallb/metallb.yaml
95   ignore_errors: yes
96   no_log: True
97
98 - name: Delete dns metallb namespace
99   # yamllint disable rule:line-length
100   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/metallb/namespace.yaml
101   ignore_errors: yes
102   no_log: True
103
104 - name: Delete dns namesapce metallb
105   command: kubectl delete secret memberlist -n metallb-system
106   ignore_errors: yes
107   no_log: True