X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=ocd%2Finfra%2Fplaybooks%2Froles%2Fk3s%2Ftasks%2Funinstall.yml;h=d58b1bb91260f905be1f026d47a277466082d6e5;hb=7d2bf0bf6892cb363e61156577e66d0e655a21e3;hp=31dbfc789e7546f16f507a500f773384b363c790;hpb=97c655ebd49ec7ff289af583750056576c6e338e;p=ealt-edge.git diff --git a/ocd/infra/playbooks/roles/k3s/tasks/uninstall.yml b/ocd/infra/playbooks/roles/k3s/tasks/uninstall.yml index 31dbfc7..d58b1bb 100644 --- a/ocd/infra/playbooks/roles/k3s/tasks/uninstall.yml +++ b/ocd/infra/playbooks/roles/k3s/tasks/uninstall.yml @@ -13,12 +13,27 @@ # limitations under the License. --- -- name: kill k3s +- name: check whether k3s is already installed + shell: + cmd: which k3s + register: result + ignore_errors: yes + no_log: True + +- 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