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.

32 lines
726 B

  1. ---
  2. - name: Check if temp directory for {{ test_name }} exists
  3. stat:
  4. path: "/tmp/{{ test_name }}"
  5. get_attributes: no
  6. get_checksum: no
  7. get_mime: no
  8. register: temp_dir_details
  9. - name: "Cleanup temp directory for {{ test_name }}"
  10. file:
  11. path: "/tmp/{{ test_name }}"
  12. state: absent
  13. - name: "Cleanup namespace for {{ test_name }}"
  14. k8s:
  15. kind: Namespace
  16. state: absent
  17. name: "{{ test_name }}"
  18. - name: Wait for namespace {{ test_name }} to be fully deleted
  19. command: kubectl get ns {{ test_name }}
  20. register: delete_namespace
  21. failed_when:
  22. - delete_namespace.rc == 0
  23. changed_when:
  24. - delete_namespace.rc == 0
  25. retries: 12
  26. delay: "10"
  27. until:
  28. - delete_namespace.rc != 0