-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path210-ushift-destroy.yaml
33 lines (30 loc) · 1.07 KB
/
210-ushift-destroy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
# This playbook destroys an ushift rpm VM on OCPVirt
# Example to run manually:
# ansible-playbook -e ushift_env=ushift10 210-ushift-rpm-destroy.yaml
- hosts: "cluster_{{ ushift_env }}"
gather_facts: false
tasks:
- name: Remove from ACM Hub cluster
when: "'manage_with_acm' in ushift_additional_features"
tags: acm
import_role:
name: feature-manage-with-acm
tasks_from: pre-destroy.yaml
vars:
acm_hub_clustername: "stormshift-{{inventory_hostname}}"
acm_hub_clusterset: "stormshift"
acm_spoke_kubeconfig: "{{ ushift_kubeconfig }}"
acm_spoke_api_endpoint: "https://{{ inventory_hostname }}.{{ sysctx_dns_domain}}:6443"
- name: Destroy MicroShift RPM
tags: dhcp,dns,vm
when: ushift_install_type == "rpm"
import_role:
name: ushift_rpm_on_kubevirt
tasks_from: 200-destroy.yml
- name: Destroy MicroShift ostree
tags: dhcp,dns,vm
when: ushift_install_type == "ostree"
import_role:
name: ushift_ostree_on_kubevirt
tasks_from: 200-destroy.yml