Remove the network device created by the flannel (#2006)
* Remove the network device created by the flannel Remove the network device created by the flannel * Modify flannel.1 device path Modify flannel.1 device path * remove trailing spacespull/2034/head
parent
fe036cbe77
commit
aeb3e647d4
|
@ -150,6 +150,34 @@
|
|||
- files
|
||||
- dns
|
||||
|
||||
- name: reset | check cni network device
|
||||
stat:
|
||||
path: /sys/class/net/cni0
|
||||
register: cni
|
||||
when: kube_network_plugin == 'flannel'
|
||||
tags:
|
||||
- flannel
|
||||
|
||||
- name: reset | remove the network device created by the flannel
|
||||
command: ip link del cni0
|
||||
when: kube_network_plugin == 'flannel' and cni.stat.exists
|
||||
tags:
|
||||
- flannel
|
||||
|
||||
- name: reset | check flannel network device
|
||||
stat:
|
||||
path: /sys/class/net/flannel.1
|
||||
register: flannel
|
||||
when: kube_network_plugin == 'flannel'
|
||||
tags:
|
||||
- flannel
|
||||
|
||||
- name: reset | remove the network device created by the flannel
|
||||
command: ip link del flannel.1
|
||||
when: kube_network_plugin == 'flannel' and flannel.stat.exists
|
||||
tags:
|
||||
- flannel
|
||||
|
||||
- name: reset | Restart network
|
||||
service:
|
||||
name: >-
|
||||
|
|
Loading…
Reference in New Issue