k3s-ansible/playbook/reset.yml
Derek Nola f369e3a015
Simplify reset playbook (#230)
* Simplify reset playbook

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Cleanup ansible_user kubeconfig

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-11-08 16:26:26 -08:00

15 lines
372 B
YAML

---
- name: Undo cluster setup
hosts: k3s_cluster
gather_facts: true
become: true
tasks:
- name: Run K3s Uninstall script
ansible.builtin.command:
cmd: k3s-uninstall.sh
removes: /var/lib/rancher/k3s/*
- name: Remove user kubeconfig
ansible.builtin.file:
path: /home/{{ ansible_user }}/.kube/config
state: absent