---
# tasks file for k8s
-- name: debug msg
- debug:
- msg: installing k8s
+- name: Check whether k8s is already installed
+ command: which k8s
+ register: result
+ ignore_errors: yes
+ no_log: True
+
+- debug:
+ msg: k8s is already present
+ when: result.stdout != ""
+
+- debug:
+# yamllint disable rule:line-length
+ msg: Ignore Uninstall Log , k8s not installed continue with Installation
+# yamllint disable rule:line-length
+ when: result.stdout == ""
- name: Install k8s
shell: