Changed install and uninstall condition
[ealt-edge.git] / ocd / infra / playbooks / roles / k3s / tasks / uninstall.yml
index 26d30c1..d58b1bb 100644 (file)
   shell:
     cmd: which k3s
   register: result
-  ignore_errors: true
+  ignore_errors: yes
+  no_log: True
 
-- name: kill k3s
+- debug:
+    msg: Uninstalling k3s...
+  when: result.stdout != ""
+
+- debug:
+    msg: "UNINSTALL: Ignore Uninstall Log , K3s not installed"
+  when: result.stdout == ""
+
+- name: "UNINSTALL: kill k3s"
   shell:
     cmd: k3s-killall.sh
   when: result is succeeded
 
-- name: uninstall k3s
+- name: "UNINSTALL: uninstall k3s"
   shell:
     cmd: k3s-uninstall.sh
   when: result is succeeded