summaryrefslogtreecommitdiffstats
path: root/roles/openshift_management/tasks/uninstall.yml
blob: 09fbc609f1ea4367d1e944252c6fb5029fdcafbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
- name: Start removing all the objects
  command: "oc delete -n {{ openshift_management_project }} {{ item }} --all"
  with_items:
    - rc
    - dc
    - po
    - svc
    - pv
    - 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