From 4586884e10e076df6ee2d0cbb31c64dae3f3168c Mon Sep 17 00:00:00 2001 From: Arvind Patel Date: Fri, 22 May 2020 00:50:36 +0530 Subject: [PATCH] Removed extra logs Change-Id: I3f2775997fecbdbd01823e0ca39d962a01c79970 --- ocd/infra/playbooks/roles/cadvisor/tasks/main.yml | 4 ---- .../playbooks/roles/grafana/tasks/install.yml | 17 ----------------- .../playbooks/roles/grafana/tasks/uninstall.yml | 15 --------------- ocd/infra/playbooks/roles/helm/tasks/main.yml | 4 ---- ocd/infra/playbooks/roles/helm/tasks/uninstall.yml | 22 +++++++--------------- ocd/infra/playbooks/roles/k3s/tasks/uninstall.yml | 15 --------------- 6 files changed, 7 insertions(+), 70 deletions(-) diff --git a/ocd/infra/playbooks/roles/cadvisor/tasks/main.yml b/ocd/infra/playbooks/roles/cadvisor/tasks/main.yml index 121a8e0..ce13bd1 100644 --- a/ocd/infra/playbooks/roles/cadvisor/tasks/main.yml +++ b/ocd/infra/playbooks/roles/cadvisor/tasks/main.yml @@ -16,10 +16,6 @@ # tasks file for cAdvisor -- name: Install cAdvisor - debug: - msg: installing cAdvisor - - include: "install.yml" when: operation == 'install' diff --git a/ocd/infra/playbooks/roles/grafana/tasks/install.yml b/ocd/infra/playbooks/roles/grafana/tasks/install.yml index e55bda8..b2c6d7f 100644 --- a/ocd/infra/playbooks/roles/grafana/tasks/install.yml +++ b/ocd/infra/playbooks/roles/grafana/tasks/install.yml @@ -13,23 +13,6 @@ # limitations under the License. --- -- name: check if grafana is already installed - shell: - cmd: helm status mec-grafana - register: result - ignore_errors: yes - no_log: True - -- debug: - msg: grafana is already present - when: result.stdout != "" - -- debug: -# yamllint disable rule:line-length - msg: Ignore Uninstall Log , Grafana not installed continue with Installation -# yamllint disable rule:line-length - when: result.stdout == "" - - name: Install grafana on x86_64 shell: cmd: helm install mec-grafana stable/grafana diff --git a/ocd/infra/playbooks/roles/grafana/tasks/uninstall.yml b/ocd/infra/playbooks/roles/grafana/tasks/uninstall.yml index 6f08c57..d4e5e33 100644 --- a/ocd/infra/playbooks/roles/grafana/tasks/uninstall.yml +++ b/ocd/infra/playbooks/roles/grafana/tasks/uninstall.yml @@ -13,21 +13,6 @@ # limitations under the License. --- -- name: check if grafana is installed before deleting - shell: - cmd: helm status mec-grafana - register: result - ignore_errors: yes - no_log: True - -- debug: - msg: Uninstalling docker... - when: result.stdout != "" - -- debug: - msg: Ignore Uninstall Log , Grafana not installed - when: result.stdout == "" - - name: Uninstall grafana shell: cmd: helm uninstall mec-grafana diff --git a/ocd/infra/playbooks/roles/helm/tasks/main.yml b/ocd/infra/playbooks/roles/helm/tasks/main.yml index 00d0493..79832a1 100644 --- a/ocd/infra/playbooks/roles/helm/tasks/main.yml +++ b/ocd/infra/playbooks/roles/helm/tasks/main.yml @@ -14,10 +14,6 @@ --- # tasks file for helm -- name: Helm install - debug: - msg: installing helm - - include: "install.yml" when: operation == 'install' diff --git a/ocd/infra/playbooks/roles/helm/tasks/uninstall.yml b/ocd/infra/playbooks/roles/helm/tasks/uninstall.yml index 1b18e36..ada76a3 100644 --- a/ocd/infra/playbooks/roles/helm/tasks/uninstall.yml +++ b/ocd/infra/playbooks/roles/helm/tasks/uninstall.yml @@ -1,4 +1,4 @@ -# Copyright 2020 Huawei Technologies Co., Ltd. +I# 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. @@ -13,20 +13,6 @@ # limitations under the License. --- -- name: check whether helm is installed before deleting - command: which helm - register: result - ignore_errors: yes - no_log: True - -- debug: - msg: Uninstalling helm... - when: result.stdout != "" - -- debug: - msg: Ignore Uninstall Log ,Helm not installed - when: result.stdout == "" - - name: Helm Uninstall on x86_64 command: rm -rf linux-amd64/helm when: result is succeeded and ansible_architecture == 'x86_64' @@ -37,12 +23,18 @@ - name: Helm Uninstall on aarch64 command: rm -rf linux-arm64/helm + ignore_errors: yes + no_log: True when: result is succeeded and ansible_architecture == 'aarch64' - name: Remove download helm file on aarch64 command: rm helm-v3.0.2-linux-arm64.tar.gz + ignore_errors: yes + no_log: True when: result is succeeded and ansible_architecture == 'aarch64' - name: Remove helm from bin command: rm /usr/local/bin/helm + ignore_errors: yes + no_log: True when: result is succeeded diff --git a/ocd/infra/playbooks/roles/k3s/tasks/uninstall.yml b/ocd/infra/playbooks/roles/k3s/tasks/uninstall.yml index bbf013c..31dbfc7 100644 --- a/ocd/infra/playbooks/roles/k3s/tasks/uninstall.yml +++ b/ocd/infra/playbooks/roles/k3s/tasks/uninstall.yml @@ -13,21 +13,6 @@ # limitations under the License. --- -- name: check whether k3s is already installed - shell: - cmd: which k3s - register: result - ignore_errors: yes - no_log: True - -- debug: - msg: Uninstalling k3s... - when: result.stdout != "" - -- debug: - msg: Ignore Uninstall Log , K3s not installed - when: result.stdout == "" - - name: kill k3s shell: cmd: k3s-killall.sh -- 2.16.6