From dfa36265b45a48ebbb44d0edd57eb6abd27ed7ea Mon Sep 17 00:00:00 2001 From: arvindpatel Date: Wed, 28 Oct 2020 17:33:36 +0530 Subject: [PATCH] mecm-mepm uninstall playbook added Signed-off-by: arvindpatel Change-Id: Ic7d67fda3f4a36845edf32a36a9215d9d6503a92 --- .../playbooks/roles/eg_mecm-mepm/tasks/main.yml | 5 ++++ .../roles/eg_mecm-mepm/tasks/uninstall.yml | 32 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml diff --git a/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/main.yml b/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/main.yml index 1fa1bf9..7faf1bd 100644 --- a/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/main.yml +++ b/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/main.yml @@ -18,4 +18,9 @@ # tasks file for eg_mecm-mepm - include: "install.yml" + static: false when: operation == 'install' + +- include: "uninstall.yml" + static: false + when: operation == 'uninstall' diff --git a/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml b/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml new file mode 100644 index 0000000..8524b68 --- /dev/null +++ b/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml @@ -0,0 +1,32 @@ +# +# Copyright 2020 Huawei Technologies Co., Ltd. +# +# 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: Helm chart uninstallation mecm mepm + command: helm uninstall mecm-mepm-edgegallery + +- name: Mecm mepm jwt delete + # yamllint disable rule:line-length + command: kubectl delete secret mecm-mepm-jwt-public-secret mecm-mepm-ssl-secret edgegallery-mepm-secret + # yamllint disable rule:line-length + +- name: Delete mepm service + # yamllint disable rule:line-length + command: kubectl delete -f /tmp/eg_mecm-mepm/deploy/conf/manifest/mepm/mepm-service-account.yaml + # yamllint disable rule:line-length + args: + chdir: /tmp/eg_mecm-mepm/deploy/ -- 2.16.6