This repository has been archived by the owner on Jan 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
/
cleanup.yml
87 lines (87 loc) · 2.98 KB
/
cleanup.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
# compute-video-demo-ansible
- name: Destroy all demo resources
hosts: local
gather_facts: False
vars_files:
- gce_vars/auth
- gce_vars/machines
- gce_vars/zone
tasks:
- name: destroy the global forwarding rule
gcp_compute_global_forwarding_rule:
name: "globalfowardingrule"
project: "{{ project }}"
auth_kind: "{{ auth_kind }}"
service_account_file: "{{ credentials_file }}"
state: absent
- name: destroy the target http proxy
gcp_compute_target_http_proxy:
name: "targethttpproxy-globalforwardingrule"
url_map: ''
project: "{{ project }}"
auth_kind: "{{ auth_kind }}"
service_account_file: "{{ credentials_file }}"
state: absent
- name: destroy the url map
gcp_compute_url_map:
name: "urlmap-globalforwardingrule"
default_service: ''
project: "{{ project }}"
auth_kind: "{{ auth_kind }}"
service_account_file: "{{ credentials_file }}"
state: absent
- name: destroy the url map
gcp_compute_backend_service:
name: "backendservice-globalforwardingrule"
project: "{{ project }}"
auth_kind: "{{ auth_kind }}"
service_account_file: "{{ credentials_file }}"
state: absent
- name: destroy the health check
gcp_compute_http_health_check:
name: "httphealthcheck-globalforwardingrule"
project: "{{ project }}"
auth_kind: "{{ auth_kind }}"
service_account_file: "{{ credentials_file }}"
state: absent
- name: destroy the instance group
gcp_compute_instance_group:
name: "instancegroup-globalforwardingrule"
zone: "{{zone}}"
project: "{{ project }}"
auth_kind: "{{ auth_kind }}"
service_account_file: "{{ credentials_file }}"
state: absent
- name: Delete the first instance
gcp_compute_instance:
name: "{{ name_zonea }}"
zone: "{{ zone }}"
project: "{{ project }}"
service_account_file: "{{ credentials_file }}"
auth_kind: "{{ auth_kind }}"
state: absent
- name: Delete the first address
gcp_compute_address:
name: "{{ name_zonea }}-ip"
region: "{{ region }}"
project: "{{ project }}"
service_account_file: "{{ credentials_file }}"
auth_kind: "{{ auth_kind }}"
state: absent
- name: Delete the second instance
gcp_compute_instance:
name: "{{ name_zoneb }}"
zone: "{{ zone }}"
project: "{{ project }}"
service_account_file: "{{ credentials_file }}"
auth_kind: "{{ auth_kind }}"
state: absent
- name: Delete the second address
gcp_compute_address:
name: "{{ name_zoneb }}-ip"
region: "{{ region }}"
project: "{{ project }}"
service_account_file: "{{ credentials_file }}"
auth_kind: "{{ auth_kind }}"
state: absent