2018-08-16 15:34:33 +00:00
|
|
|
---
|
|
|
|
- name: "reset | check if network device {{ iface }} is present"
|
|
|
|
stat:
|
|
|
|
path: "/sys/class/net/{{ iface }}"
|
2021-02-10 13:36:59 +00:00
|
|
|
get_attributes: no
|
|
|
|
get_checksum: no
|
|
|
|
get_mime: no
|
2018-08-16 15:34:33 +00:00
|
|
|
register: device_remains
|
|
|
|
|
|
|
|
- name: "reset | remove network device {{ iface }}"
|
|
|
|
command: "ip link del {{ iface }}"
|
|
|
|
when: device_remains.stat.exists
|