Fix issue around using ip addresses in inventory, download and remove agent service properly

Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
Derek Nola committed 2023-11-10 15:25:10 -08:00
1 parent e01a8a2a8a
commit 3b9982013a
3 files changed
+21 -3

No files matched your search

+7 -1
View File
@@ -4,10 +4,16 @@
gather_facts: true
become: true
tasks:
- name: Run K3s Uninstall script
- name: Run K3s Uninstall script [server]
when: "'server' in group_names"
ansible.builtin.command:
cmd: k3s-uninstall.sh
removes: /var/lib/rancher/k3s/*
- name: Run K3s Uninstall script [agent]
when: "'agent' in group_names"
ansible.builtin.command:
cmd: k3s-agent-uninstall.sh
removes: /var/lib/rancher/k3s/*
- name: Remove user kubeconfig
ansible.builtin.file:
path: /home/{{ ansible_user }}/.kube/config