uninstall.yml 1009 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ---
  2. - include_role:
  3. name: lib_openshift
  4. - name: Uninstall CFME - ManageIQ
  5. debug:
  6. msg: Uninstalling Cloudforms Management Engine - ManageIQ
  7. - name: Ensure the CFME project is removed
  8. oc_project:
  9. state: absent
  10. name: "{{ openshift_cfme_project }}"
  11. - name: Ensure the CFME template is removed
  12. oc_obj:
  13. namespace: "{{ openshift_cfme_project }}"
  14. state: absent
  15. kind: template
  16. name: manageiq
  17. - name: Ensure the CFME PVs are removed
  18. oc_obj:
  19. state: absent
  20. all_namespaces: True
  21. kind: pv
  22. name: "{{ item }}"
  23. with_items: "{{ openshift_cfme_pv_exports }}"
  24. - name: Ensure the CFME user is removed
  25. oc_user:
  26. state: absent
  27. username: "{{ openshift_cfme_user }}"
  28. - name: Ensure the CFME NFS Exports are removed
  29. file:
  30. path: /etc/exports.d/openshift_cfme.exports
  31. state: absent
  32. register: nfs_exports_removed
  33. - name: Ensure the NFS export table is refreshed if exports were removed
  34. command: exportfs -ar
  35. when:
  36. - nfs_exports_removed.changed