Edge gallery roles added
[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/edge/network-isolation/eg-sp-controller.yaml
46   args:
47     chdir: /tmp/eg_mep/deploy/
48   ignore_errors: yes
49   no_log: True
50
51 - name: Delete network isolation multus eg sp rbac
52   # yamllint disable rule:line-length
53   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/network-isolation/eg-sp-rbac.yaml
54   args:
55     chdir: /tmp/eg_mep/deploy/
56   ignore_errors: yes
57   no_log: True
58
59 - name: Delete network isolation multus
60   # yamllint disable rule:line-length
61   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/network-isolation/multus.yaml
62   args:
63     chdir: /tmp/eg_mep/deploy/
64   ignore_errors: yes
65   no_log: True
66
67 - name: Delete network isolation rm host local
68   # yamllint disable rule:line-length
69   command: rm /opt/cni/bin/macvlan /opt/cni/bin/host-local
70   args:
71     chdir: /tmp/remote-platform/
72   ignore_errors: yes
73   no_log: True
74
75 - name: Delete network isolation eg mp1
76   command: ip link set dev eg-mp1 down
77   args:
78     chdir: /tmp/remote-platform/
79   ignore_errors: yes
80   no_log: True
81
82 - name: Delete nnetwork isolation eg mp1 link
83   command: ip link delete eg-mp1
84   args:
85     chdir: /tmp/remote-platform/
86   ignore_errors: yes
87   no_log: True
88
89 - name: Delete network isolation eg mm5
90   command: ip link set dev eg-mm5 down
91   args:
92     chdir: /tmp/remote-platform/
93   ignore_errors: yes
94   no_log: True
95
96 - name: Delete network isolation eg mm5 link
97   command: ip link delete eg-mm5
98   args:
99     chdir: /tmp/remote-platform/
100   ignore_errors: yes
101   no_log: True
102
103 - name: Delete network isolation multus rm
104   command: rm /opt/cni/bin/multus
105   args:
106     chdir: /tmp/remote-platform/
107   ignore_errors: yes
108   no_log: True
109
110 - name: Uninstall dns metallb config mep
111   # yamllint disable rule:line-length
112   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/metallb/config-map.yaml
113   args:
114     chdir: /tmp/eg_mep/deploy/
115   ignore_errors: yes
116   no_log: True
117
118 - name: Delete dns metallb
119   # yamllint disable rule:line-length
120   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/metallb/metallb.yaml
121   args:
122     chdir: /tmp/eg_mep/deploy/
123   ignore_errors: yes
124   no_log: True
125
126 - name: Delete dns metallb namespace
127   # yamllint disable rule:line-length
128   command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/metallb/namespace.yaml
129   args:
130     chdir: /tmp/eg_mep/deploy/
131   ignore_errors: yes
132   no_log: True
133
134 - name: Delete dns namesapce metallb
135   command: kubectl delete secret memberlist -n metallb-system
136   ignore_errors: yes
137   no_log: True