Changed install and uninstall condition
[ealt-edge.git] / ocd / infra / playbooks / roles / prometheus / tasks / install.yml
index 0c85ecf..f8472b4 100644 (file)
   no_log: True
 
 - debug:
-    msg: Prpmetheus is already present
-  when: result.rc == 0
+    msg: prometheus is already present
+  when: result.stdout != ""
 
-- name: Install prometheus on x86_64
+- debug:
+# yamllint disable rule:line-length
+    msg: Ignore Uninstall Log , prometheus not installed continue with Installation
+# yamllint disable rule:line-length
+  when: result.stdout == ""
+
+- name: "INSTALL: Install prometheus on x86_64"
   shell:
     cmd: helm install mep-prometheus stable/prometheus --version v9.3.1
   when: result is failed and ansible_architecture == 'x86_64'
 
-- name: copy values.yaml to host
+- name: "INSTALL: copy values.yaml to host"
   copy:
     src: values.yaml
     dest: /tmp/prometheus/
   when: result is failed and ansible_architecture == 'aarch64'
 
-- name: Install prometheus on aarch64
+- name: "INSTALL: Install prometheus on aarch64"
   shell:
     cmd: 'helm install mep-prometheus
     stable/prometheus -f /tmp/prometheus/values.yaml --version v9.3.1'