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>
This commit is contained in:
Derek Nola
2023-11-08 16:26:26 -08:00
committed by GitHub
parent dfc23c818a
commit f369e3a015
3 changed files with 9 additions and 68 deletions

View File

@@ -3,5 +3,12 @@
hosts: k3s_cluster
gather_facts: true
become: true
roles:
- role: reset
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