uninstall.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. ignore_errors: True
  21. tasks:
  22. - name: Clean DNS entries
  23. import_role:
  24. name: openshift_openstack
  25. tasks_from: populate-dns.yml
  26. vars:
  27. l_openshift_openstack_dns_update_nodes: "{{ groups.OSEv3 }}"
  28. l_dns_record_state: absent
  29. when:
  30. - openshift_openstack_external_nsupdate_keys is defined
  31. - openshift_openstack_external_nsupdate_keys.private is defined or openshift_openstack_external_nsupdate_keys.public is defined
  32. - name: Remove OpenStack resources
  33. hosts: localhost
  34. tasks:
  35. - name: retrieve cluster name from the environment if present
  36. set_fact:
  37. openshift_openstack_stack_name: "{{ lookup('env', 'OPENSHIFT_CLUSTER') | ternary (lookup('env', 'OPENSHIFT_CLUSTER'), omit) }}"
  38. - name: Remove OpenStack resources
  39. import_role:
  40. name: openshift_openstack
  41. tasks_from: unprovision.yml