summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cfme/tasks/uninstall.yml
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-10-05 09:42:09 -0700
committerGitHub <noreply@github.com>2017-10-05 09:42:09 -0700
commit6f06b5ed6ada0bf22051b7af79bd474ae2398ee9 (patch)
tree2d54f3580de1580c14c956cbd9532338c1193d18 /roles/openshift_cfme/tasks/uninstall.yml
parent8e2019c9c3840a64425c34c23ace9e9cbd6b7eb0 (diff)
parentd4c1a0443e7c38343752f880d6ae3c2c2c33ab54 (diff)
downloadopenshift-6f06b5ed6ada0bf22051b7af79bd474ae2398ee9.tar.gz
openshift-6f06b5ed6ada0bf22051b7af79bd474ae2398ee9.tar.bz2
openshift-6f06b5ed6ada0bf22051b7af79bd474ae2398ee9.tar.xz
openshift-6f06b5ed6ada0bf22051b7af79bd474ae2398ee9.zip
Merge pull request #5336 from tbielawa/cfme_4.6
Automatic merge from submit-queue. Cfme 4.6 # Description * Implements support for **CFME 4.6** in OCP 3.7 * **Replaces** the Tech Preview CFME 4.5 release included in OCP 3.6 * Does not support graceful migrations from the CFME 4.5 tech preview release # References * [Trello - (5) Integrate CFME 4.6 into OCP Installation](https://trello.com/c/Rzfn5Qa8/380-5-integrate-cfme-46-into-ocp-installation) Ensure the following RFE/Errors do not happen again - [x] #4555 - Error creating the CFME user - [x] #4556 - Error in PV template evaluation - [x] #4822 - Changing `maxImagesBulkImportedPerRepository` parameter - [x] #4568 - Add NFS directory support # Features Ensure the following features are configurable in the role - [x] POC deployments can easily default to NFS storage - [ ] Production/Cloud deployments can use automatic storage providers - [ ] Able to select between podified vs. external PostgreSQL database (podified uses configured storage mechanism) - [x] Template resource requests can be overridden for POC deployments
Diffstat (limited to 'roles/openshift_cfme/tasks/uninstall.yml')
-rw-r--r--roles/openshift_cfme/tasks/uninstall.yml63
1 files changed, 20 insertions, 43 deletions
diff --git a/roles/openshift_cfme/tasks/uninstall.yml b/roles/openshift_cfme/tasks/uninstall.yml
index 406b59364..068d065c2 100644
--- a/roles/openshift_cfme/tasks/uninstall.yml
+++ b/roles/openshift_cfme/tasks/uninstall.yml
@@ -1,46 +1,23 @@
---
-- include_role:
- name: lib_openshift
+- name: Start removing all the objects
+ command: "oc delete -n {{ openshift_cfme_project }} {{ item }} --all"
+ with_items:
+ - rc
+ - dc
+ - po
+ - svc
+ - pv
+ - pvc
+ - statefulsets
+ - routes
-- name: Uninstall CFME - ManageIQ
- debug:
- msg: Uninstalling Cloudforms Management Engine - ManageIQ
+- name: Remove the project
+ command: "oc delete -n {{ openshift_cfme_project }} project {{ openshift_cfme_project }}"
-- name: Ensure the CFME project is removed
- oc_project:
- state: absent
- name: "{{ openshift_cfme_project }}"
-
-- name: Ensure the CFME template is removed
- oc_obj:
- namespace: "{{ openshift_cfme_project }}"
- state: absent
- kind: template
- name: manageiq
-
-- name: Ensure the CFME PVs are removed
- oc_obj:
- state: absent
- all_namespaces: True
- kind: pv
- name: "{{ item }}"
- with_items: "{{ openshift_cfme_pv_exports }}"
- when: not (openshift_cloudprovider_kind is defined and (openshift_cloudprovider_kind == 'aws' or openshift_cloudprovider_kind == 'gce'))
-
-- name: Ensure the CFME user is removed
- oc_user:
- state: absent
- username: "{{ openshift_cfme_user }}"
-
-- name: Ensure the CFME NFS Exports are removed
- file:
- path: /etc/exports.d/openshift_cfme.exports
- state: absent
- register: nfs_exports_removed
- when: not (openshift_cloudprovider_kind is defined and (openshift_cloudprovider_kind == 'aws' or openshift_cloudprovider_kind == 'gce'))
-
-- name: Ensure the NFS export table is refreshed if exports were removed
- command: exportfs -ar
- when:
- - nfs_exports_removed.changed
- - not (openshift_cloudprovider_kind is defined and (openshift_cloudprovider_kind == 'aws' or openshift_cloudprovider_kind == 'gce'))
+- name: Verify project has been destroyed
+ command: "oc get project {{ openshift_cfme_project }}"
+ ignore_errors: True
+ register: project_terminated
+ until: project_terminated.stderr.find("NotFound") != -1
+ delay: 5
+ retries: 30