c12s-kubespray/roles/network_plugin/flannel/tasks/reset.yml

18 lines
453 B
YAML

---
- name: reset | check cni network device
stat:
path: /sys/class/net/cni0
register: cni
- name: reset | remove the network device created by the flannel
command: ip link del cni0
when: cni.stat.exists
- name: reset | check flannel network device
stat:
path: /sys/class/net/flannel.1
register: flannel
- name: reset | remove the network device created by the flannel
command: ip link del flannel.1
when: flannel.stat.exists