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.

30 lines
729 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. command: "kubectl delete namespace {{ test_name }}"
  15. changed_when: false
  16. - name: Wait for namespace {{ test_name }} to be fully deleted
  17. command: kubectl get ns {{ test_name }}
  18. register: delete_namespace
  19. failed_when:
  20. - delete_namespace.rc == 0
  21. changed_when:
  22. - delete_namespace.rc == 0
  23. retries: 12
  24. delay: "10"
  25. until:
  26. - delete_namespace.rc != 0