Added pre installation and unindtallation
[ealt-edge.git] / ocd / infra / playbooks / roles / cAdvisor / tasks / install.yml
index 73a8b90..8c49f6a 100644 (file)
   shell:
     cmd: helm status cadvisor
   register: result
-  ignore_errors: 'True'
+  failed_when: false
+  no_log: True
 
-- name: "This is for Add repo helm "
+- debug:
+    msg: cAdvisor is already present
+  when: result.rc == 0
+
+- meta: end_play
+  when: result.rc == 0
+
+- name: "Add helm repo"
   command: helm repo add code-chris https://code-chris.github.io/helm-charts
   when: result is failed
 
-- name: "This is for Update helm repo"
+- name: "Update helm repo"
   command: helm repo update
   when: result is failed
 
@@ -33,7 +41,7 @@
     dest: /tmp/cAdvisor/
   when: result is failed
 
-- name: "Command for install cAdvisor"
+- name: "Installing cAdvisor"
 # yamllint disable rule:line-length
   command: helm install cadvisor code-chris/cadvisor -f /tmp/cAdvisor/values.yaml
 # yamllint disable rule:line-length