mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2024-11-14 10:15:24 +01:00
19c206d0cb
* Update minimum ansible version requirements to avoid airgap error Signed-off-by: Derek Nola <derek.nola@suse.com>
24 lines
719 B
YAML
24 lines
719 B
YAML
---
|
|
- name: Undo cluster setup
|
|
hosts: k3s_cluster
|
|
become: true
|
|
tasks:
|
|
- 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
|
|
state: absent
|
|
- name: Remove k3s install script
|
|
ansible.builtin.file:
|
|
path: /usr/local/bin/k3s-install.sh
|
|
state: absent
|