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.

23 lines
625 B

  1. ---
  2. - name: reset | check dummy0 network device
  3. stat:
  4. path: /sys/class/net/dummy0
  5. get_attributes: no
  6. get_checksum: no
  7. get_mime: no
  8. register: dummy0
  9. - name: reset | remove the network device created by calico
  10. command: ip link del dummy0
  11. when: dummy0.stat.exists
  12. - name: reset | get remaining routes set by bird
  13. command: ip route show proto bird
  14. changed_when: false
  15. register: bird_routes
  16. - name: reset | remove remaining routes set by bird # noqa 301
  17. command: "ip route del {{ bird_route }} proto bird"
  18. with_items: "{{ bird_routes.stdout_lines }}"
  19. loop_control:
  20. loop_var: bird_route