2022-12-05 05:18:04 -05:00
|
|
|
---
|
|
|
|
- name: reset the nodes
|
|
|
|
ansible.builtin.shell:
|
|
|
|
cmd: |
|
|
|
|
kubeadm reset -f
|
|
|
|
|
|
|
|
- name: delete orphaned files
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- /etc/cni
|
|
|
|
- /etc/kubernetes
|
|
|
|
- /var/lib/etcd
|
|
|
|
- /var/lib/kubelet
|
|
|
|
- /var/run/kubernetes
|
|
|
|
|
2022-12-05 05:57:14 -05:00
|
|
|
- name: purge iptables rules
|
|
|
|
ansible.builtin.iptables:
|
|
|
|
flush: true
|
|
|
|
table: "{{ item }}"
|
|
|
|
with_items:
|
|
|
|
- filter
|
|
|
|
- raw
|
|
|
|
- nat
|
|
|
|
- mangle
|
|
|
|
|
|
|
|
- name: purge iptables chains
|
2022-12-05 06:16:54 -05:00
|
|
|
ansible.builtin.shell:
|
|
|
|
cmd: |
|
|
|
|
iptables -t {{ item }} -X
|
2022-12-05 05:57:14 -05:00
|
|
|
with_items:
|
|
|
|
- filter
|
|
|
|
- raw
|
|
|
|
- nat
|
|
|
|
- mangle
|
2022-12-05 05:18:04 -05:00
|
|
|
|
|
|
|
- name: restart the containerd service
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: containerd
|
2022-12-05 05:57:14 -05:00
|
|
|
state: reloaded
|