You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
329 B

  1. ---
  2. - name: "reset | check if network device {{ iface }} is present"
  3. stat:
  4. path: "/sys/class/net/{{ iface }}"
  5. get_attributes: no
  6. get_checksum: no
  7. get_mime: no
  8. register: device_remains
  9. - name: "reset | remove network device {{ iface }}"
  10. command: "ip link del {{ iface }}"
  11. when: device_remains.stat.exists