-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path5_cloud-unprovision.yaml
25 lines (19 loc) · 1020 Bytes
/
5_cloud-unprovision.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
---
- name: Unprovision Azure Cloud Resources
hosts: localhost
gather_facts: no
vars_files:
- variables.yaml
tasks:
- name: Select Azure Subscription
ansible.builtin.shell: az account set --subscription "{{ SUBSCRIPTION_ID }}"
- name: Delete Azure Resource Group
ansible.builtin.shell: az group delete --resource-group "{{ RESOURCE_GROUP }}" --yes
- name: Purge Azure Key Vault
ansible.builtin.shell: az keyvault purge --no-wait --name "{{ KEYVAULT_NAME }}" --location "{{ LOCATION }}"
- name: Purge Azure Open AI Service
ansible.builtin.shell: az cognitiveservices account purge --name "{{ AZURE_OPENAI_NAME }}" --resource-group "{{ RESOURCE_GROUP }}" --location "eastus"
- name: Delete Service Principal for the GenAI Factory Agent
ansible.builtin.shell: az ad app delete --id "{{ FACTORY_AGENT_SP_APPID }}"
- name: Delete Service Principal to manage Azure from Edge Cluster
ansible.builtin.shell: az ad app delete --id "{{ AIO_SP_APPID }}"