123456789101112131415161718192021222324252627282930313233 |
- ---
- - name: Get kuryr services
- delegate_to: "{{ groups.oo_first_master.0 }}"
- oc_obj:
- kind: endpoints
- state: list
- all_namespaces: true
- register: svc_output
- ignore_errors: true
- - name: Delete kuryr LoadBalancers (cascading)
- os_lbaas_deletion:
- lbaas_annotation: "{{ item.metadata.annotations }}"
- with_items: "{{ svc_output.results.results[0]['items'] if 'results' in svc_output else [] }}"
- when:
- - openshift_openstack_lbaasv2_provider == "Octavia"
- - not (item.metadata.name == "kubernetes")
- - openshift_use_kuryr|default(false) == true
- - item.metadata.annotations is defined
- - name: Remove trunk subports
- os_subports_deletion:
- trunk_name: "{{ item }}"
- with_items: "{{ groups['cluster_hosts'] }}"
- when:
- - openshift_use_kuryr|default(false) == true
- - name: Delete the Stack
- ignore_errors: False
- os_stack:
- name: "{{ openshift_openstack_stack_name }}"
- state: "absent"
- wait: yes
|