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 spaces
This commit is contained in:
parent
fe036cbe77
commit
aeb3e647d4
1 changed files with 28 additions and 0 deletions
|
@ -150,6 +150,34 @@
|
||||||
- files
|
- files
|
||||||
- dns
|
- 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
|
- name: reset | Restart network
|
||||||
service:
|
service:
|
||||||
name: >-
|
name: >-
|
||||||
|
|
Loading…
Reference in a new issue