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:
riverzhang 2017-12-06 08:15:40 -06:00 committed by Matthew Mosesohn
parent fe036cbe77
commit aeb3e647d4

View file

@ -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: >-