1
0

k8s destroy

This commit is contained in:
michael 2022-12-05 23:57:14 +13:00
parent f230db3739
commit bcae7303ab

View File

@ -11,20 +11,31 @@
with_items: with_items:
- /etc/cni - /etc/cni
- /etc/kubernetes - /etc/kubernetes
- /var/lib/dockershim
- /var/lib/etcd - /var/lib/etcd
- /var/lib/kubelet - /var/lib/kubelet
- /var/run/kubernetes - /var/run/kubernetes
- name: purge iptables - name: purge iptables rules
ansible.builtin.shell: ansible.builtin.iptables:
cmd: | flush: true
iptables -F && iptables -X table: "{{ item }}"
iptables -t nat -F && iptables -t nat -X with_items:
iptables -t raw -F && iptables -t raw -X - filter
iptables -t mangle -F && iptables -t mangle -X - raw
- nat
- mangle
- name: purge iptables chains
ansible.builtin.iptables:
table: "{{ item }}"
state: absent
with_items:
- filter
- raw
- nat
- mangle
- name: restart the containerd service - name: restart the containerd service
ansible.builtin.service: ansible.builtin.service:
name: containerd name: containerd
state: restarted state: reloaded