---
- name: Start removing all the objects
  command: "oc delete -n {{ openshift_management_project }} {{ item }} --all"
  with_items:
    - rc
    - dc
    - po
    - svc
    - pvc
    - statefulsets
    - routes

- name: Remove the project
  command: "oc delete -n {{ openshift_management_project }} project {{ openshift_management_project }}"

- name: Verify project has been destroyed
  command: "oc get project {{ openshift_management_project }}"
  ignore_errors: True
  register: project_terminated
  until: project_terminated.stderr.find("NotFound") != -1
  delay: 5
  retries: 30
