uninstall.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ---
  2. - name: Evaluate basic OpenStack groups
  3. import_playbook: evaluate_groups.yml
  4. - name: Evaluate remaining cluster groups
  5. import_playbook: ../../init/evaluate_groups.yml
  6. - name: Unsubscribe RHEL instances
  7. hosts: oo_all_hosts
  8. become: yes
  9. gather_facts: yes
  10. tasks:
  11. - name: Unsubscribe RHEL instances
  12. import_role:
  13. name: rhel_unsubscribe
  14. when:
  15. - ansible_distribution == "RedHat"
  16. - rhsub_user is defined
  17. - rhsub_pass is defined
  18. - name: Clean DNS entries
  19. hosts: localhost
  20. tasks:
  21. - name: Clean DNS entries
  22. import_role:
  23. name: openshift_openstack
  24. tasks_from: clean-dns.yml
  25. when:
  26. - openshift_openstack_external_nsupdate_keys is defined
  27. - openshift_openstack_external_nsupdate_keys.private is defined or openshift_openstack_external_nsupdate_keys.public is defined
  28. - name: Remove OpenStack resources
  29. hosts: localhost
  30. tasks:
  31. - name: retrieve cluster name from the environment if present
  32. set_fact:
  33. openshift_openstack_stack_name: "{{ lookup('env', 'OPENSHIFT_CLUSTER') | ternary (lookup('env', 'OPENSHIFT_CLUSTER'), omit) }}"
  34. - name: Remove OpenStack resources
  35. import_role:
  36. name: openshift_openstack
  37. tasks_from: unprovision.yml