Browse Source

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
pull/2035/head
riverzhang 7 years ago
committed by Matthew Mosesohn
parent
commit
aeb3e647d4
1 changed files with 28 additions and 0 deletions
  1. 28
      roles/reset/tasks/main.yml

28
roles/reset/tasks/main.yml

@ -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…
Cancel
Save