# tasks file for cAdvisor
-- name: Install cAdvisor
- debug:
- msg: installing cAdvisor
-
- include: "install.yml"
when: operation == 'install'
# 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
# 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
---
# tasks file for helm
-- name: Helm install
- debug:
- msg: installing helm
-
- include: "install.yml"
when: operation == 'install'
-# 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.
# 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'
- 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
# 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