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

13 lines
329 B
YAML
Raw Permalink Normal View History

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