From 85a634b1ba537e55c8b65404fd4467ad3732c683 Mon Sep 17 00:00:00 2001 From: "arvind.patel@huawei.com" Date: Mon, 7 Dec 2020 22:19:00 +0530 Subject: [PATCH 1/1] Log issue Signed-off-by: arvind.patel@huawei.com Change-Id: I3cf6c2d57937527a9005741430c08bd5b29f393e --- .../iotgateway/playbooks/eliot-all-uninstall.yml | 32 +++++++++++----------- .../playbooks/roles/docker/tasks/uninstall.yml | 21 ++++++++++++++ .../playbooks/roles/eg_mep/tasks/uninstall.yml | 10 +++---- 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/blueprints/iotgateway/playbooks/eliot-all-uninstall.yml b/blueprints/iotgateway/playbooks/eliot-all-uninstall.yml index 7fb6742..6062bd2 100644 --- a/blueprints/iotgateway/playbooks/eliot-all-uninstall.yml +++ b/blueprints/iotgateway/playbooks/eliot-all-uninstall.yml @@ -15,22 +15,6 @@ --- -############ OCD ############ - -- hosts: ocdconsolidated - become: yes - tags: - - ocdhost - - ocdconsolidated - - roles: - - eg_helm-repo - - eg_registry - - eg_certs - - helm - - k8s - - docker - ############ Master ############ ### EdgeGallery related ### @@ -125,3 +109,19 @@ roles: - k3s - docker + +############ OCD ############ + +- hosts: ocdconsolidated + become: yes + tags: + - ocdhost + - ocdconsolidated + + roles: + - eg_helm-repo + - eg_registry + - eg_certs + - helm + - k8s + - docker diff --git a/blueprints/iotgateway/playbooks/roles/docker/tasks/uninstall.yml b/blueprints/iotgateway/playbooks/roles/docker/tasks/uninstall.yml index f756489..f5a40f7 100644 --- a/blueprints/iotgateway/playbooks/roles/docker/tasks/uninstall.yml +++ b/blueprints/iotgateway/playbooks/roles/docker/tasks/uninstall.yml @@ -57,6 +57,26 @@ when: result is succeeded and ansible_architecture == 'aarch64' #when: result is succeeded +- name: "UNINSTALL: Uninstall docker engine" + command: apt-get purge -y docker-engine + ignore_errors: yes + when: result is succeeded and ansible_architecture == 'x86_64' + +- name: "UNINSTALL: Uninstall docker" + command: apt-get purge -y docker + ignore_errors: yes + when: result is succeeded and ansible_architecture == 'x86_64' + +- name: "UNINSTALL: Uninstall docker.io" + command: apt-get purge -y docker.io + ignore_errors: yes + when: result is succeeded and ansible_architecture == 'x86_64' + +- name: "UNINSTALL: Uninstall docker.io" + command: apt-get purge docker-ce docker-ce-cli containerd.io + ignore_errors: yes + when: result is succeeded and ansible_architecture == 'x86_64' + - debug: msg: "CentOS commands start" @@ -65,3 +85,4 @@ cmd: yes | yum remove docker-ce docker-ce-cli containerd.io ignore_errors: yes no_log: true + when: ansible_facts['distribution'] == "CentOS" diff --git a/blueprints/iotgateway/playbooks/roles/eg_mep/tasks/uninstall.yml b/blueprints/iotgateway/playbooks/roles/eg_mep/tasks/uninstall.yml index fba5576..3cf66ef 100644 --- a/blueprints/iotgateway/playbooks/roles/eg_mep/tasks/uninstall.yml +++ b/blueprints/iotgateway/playbooks/roles/eg_mep/tasks/uninstall.yml @@ -35,6 +35,11 @@ ignore_errors: yes no_log: True +- name: Delete dns namesapce metallb + command: kubectl delete secret memberlist -n metallb-system + ignore_errors: yes + no_log: True + - name: Delete ssl config namesapce mep command: kubectl delete ns mep ignore_errors: yes @@ -100,8 +105,3 @@ command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/metallb/namespace.yaml ignore_errors: yes no_log: True - -- name: Delete dns namesapce metallb - command: kubectl delete secret memberlist -n metallb-system - ignore_errors: yes - no_log: True -- 2.16.6