From 09bbdadcee60d32bc97ea1cb3836afb693e0bd65 Mon Sep 17 00:00:00 2001
From: Erwan Miran <mirwan@users.noreply.github.com>
Date: Mon, 8 Apr 2019 11:26:25 +0200
Subject: [PATCH] remove nodelocaldns iface on reset (#4460)

---
 roles/reset/tasks/main.yml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml
index 2bc48db8d..98f3b51a3 100644
--- a/roles/reset/tasks/main.yml
+++ b/roles/reset/tasks/main.yml
@@ -153,6 +153,17 @@
     - kube_proxy_mode == 'ipvs'
     - kube_ipvs0.stat.exists
 
+- name: reset | check nodelocaldns network device
+  stat:
+    path: /sys/class/net/nodelocaldns
+  register: nodelocaldns_device
+
+- name: reset | Remove nodelocaldns
+  command: "ip link del nodelocaldns"
+  when:
+    - enable_nodelocaldns|default(false)|bool
+    - nodelocaldns_device.stat.exists
+
 - name: reset | delete some files and directories
   file:
     path: "{{ item }}"
-- 
GitLab