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.

29 lines
665 B

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