diff options
author | Tim Bielawa <tbielawa@redhat.com> | 2017-04-28 13:44:54 -0400 |
---|---|---|
committer | Tim Bielawa <tbielawa@redhat.com> | 2017-06-14 15:17:01 -0400 |
commit | e1a91973650a26859d1d02449ac35b1946746392 (patch) | |
tree | 234d847f3374b349e531e0d0e0c9ea95e35e5128 /roles/openshift_cfme/tasks/uninstall.yml | |
parent | cf81c53e8b747603ba6599f8c9fbdf50feff4c88 (diff) | |
download | openshift-e1a91973650a26859d1d02449ac35b1946746392.tar.gz openshift-e1a91973650a26859d1d02449ac35b1946746392.tar.bz2 openshift-e1a91973650a26859d1d02449ac35b1946746392.tar.xz openshift-e1a91973650a26859d1d02449ac35b1946746392.zip |
First POC of a CFME turnkey solution in openshift-anisble
Diffstat (limited to 'roles/openshift_cfme/tasks/uninstall.yml')
-rw-r--r-- | roles/openshift_cfme/tasks/uninstall.yml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/roles/openshift_cfme/tasks/uninstall.yml b/roles/openshift_cfme/tasks/uninstall.yml new file mode 100644 index 000000000..cba734a0e --- /dev/null +++ b/roles/openshift_cfme/tasks/uninstall.yml @@ -0,0 +1,43 @@ +--- +- include_role: + name: lib_openshift + +- name: Uninstall CFME - ManageIQ + debug: + msg: Uninstalling Cloudforms Management Engine - ManageIQ + +- 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 }}" + +- 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 + +- name: Ensure the NFS export table is refreshed if exports were removed + command: exportfs -ar + when: + - nfs_exports_removed.changed |