31 lines
712 B
YAML
31 lines
712 B
YAML
|
---
|
||
|
- name: Cluster Nuke
|
||
|
hosts:
|
||
|
- master
|
||
|
- worker
|
||
|
become: true
|
||
|
gather_facts: true
|
||
|
any_errors_fatal: true
|
||
|
pre_tasks:
|
||
|
- name: Pausing for 2 seconds...
|
||
|
ansible.builtin.pause:
|
||
|
seconds: 2
|
||
|
tasks:
|
||
|
- name: Uninstall k3s
|
||
|
ansible.builtin.include_role:
|
||
|
name: xanmanning.k3s
|
||
|
public: true
|
||
|
vars:
|
||
|
k3s_state: uninstalled
|
||
|
- name: Gather list of CNI files
|
||
|
ansible.builtin.find:
|
||
|
paths: /etc/cni/net.d
|
||
|
patterns: "*"
|
||
|
hidden: true
|
||
|
register: directory_contents
|
||
|
- name: Delete CNI files
|
||
|
ansible.builtin.file:
|
||
|
path: "{{ item.path }}"
|
||
|
state: absent
|
||
|
loop: "{{ directory_contents.files }}"
|