ealt-all.yml changes
[ealt-edge.git] / ocd / infra / playbooks / roles / grafana / tasks / uninstall.yml
index d95f346..93a5be0 100644 (file)
 ---
 - name: check if grafana is installed before deleting
   shell:
-    cmd: helm status mec-grafana
+    cmd: helm status grafana
   register: result
-  failed_when: false
+  ignore_errors: yes
   no_log: True
 
 - debug:
-    msg: grafana is not present
-  when: result.rc == 2
+    msg: Uninstalling docker...
+  when: result.stdout != ""
 
-- meta: end_play
-  when: result.rc == 2
+- debug:
+    msg: Ignore Uninstall Log , Grafana not installed
+  when: result.stdout == ""
+
+- name: Uninstall grafana on arm
+  shell:
+    cmd: helm uninstall grafana
+  when: result is succeeded and ansible_architecture == 'aarch64'
 
-- name: Uninstall grafana
+- name: Uninstall grafana on x86
   shell:
-    cmd: helm uninstall mec-grafana
-  when: result is succeeded
+    cmd: helm uninstall grafana
+  when: result is succeeded and ansible_architecture == 'x86_64'