c12s-kubespray/roles/network_plugin/cilium/tasks/reset_iface.yml

10 lines
268 B
YAML
Raw Permalink Normal View History

---
- name: "reset | check if network device {{ iface }} is present"
stat:
path: "/sys/class/net/{{ iface }}"
register: device_remains
- name: "reset | remove network device {{ iface }}"
command: "ip link del {{ iface }}"
when: device_remains.stat.exists