-
Notifications
You must be signed in to change notification settings - Fork 4
/
Reset_Edge_Demo_Playbook.yml
58 lines (54 loc) · 1.83 KB
/
Reset_Edge_Demo_Playbook.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
- name: Reset retail-edge workload deployment playbook # comment out steps or VM's you don't want to delete below
hosts: edge
connection: ansible.builtin.local
strategy: free
gather_facts: false
environment: #if set here - hypercore modules will automatically use this for each remote cluster - avoiding need to specify cluster_instance for each test
SC_HOST: "https://{{ inventory_hostname }}"
SC_USERNAME: "{{ scale_admin_user }}"
SC_PASSWORD: "{{ scale_admin_pass }}"
tasks:
# - name: Get cluster VM info
# scale_computing.hypercore.vm_info:
# cluster_instance:
# host: "https://{{inventory_hostname}}"
# username: "{{scale_user}}"
# password: "{{scale_pass}}"
# register: vm_info
# - name: output the vm_info request results
# debug:
# var: vm_info
- name: Delete demo vms
scale_computing.hypercore.vm:
cluster_instance:
host: "https://{{ inventory_hostname }}"
username: "{{ scale_admin_user }}"
password: "{{ scale_admin_pass }}"
vm_name: "{{ item }}"
state: absent
loop:
- demo1
- demo2
- "pos-{{ site_name }}"
- "demo-{{ site_name }}"
- "pharmacy-{{ site_name }}"
- "security-{{ site_name }}"
- "iot-{{ site_name }}"
- "securityCONTRACTOR-{{ site_name }}"
- "pos-site"
- "pharmacy-site"
- "iot-site"
- "security-site"
# - "ubuntu20_04"
- "{{ site_name }}-avassa"
- "{{ site_name }}-avassa-clone"
- "jeffdemo"
- "jeff-demo1"
- "jeff-demo1-clone"
- "group5-kicknucleus"
- "group6"
# - "win10IoT-uefi-cloudbase" #note older hypercore has not uefi version pre-imported
- name: Cleanup old snapshot schedule
scale_computing.hypercore.snapshot_schedule:
name: ansible-snap-schedule
state: absent