init repo
This commit is contained in:
commit
444a0e0041
13 changed files with 160 additions and 0 deletions
31
codebase/roles/gke_cluster_destroy/tasks/main.yml
Normal file
31
codebase/roles/gke_cluster_destroy/tasks/main.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
# DO NOT CHANGE!
|
||||
---
|
||||
|
||||
- name: Destroy Google Kubernetes Engine Cluster
|
||||
gcp_container_cluster:
|
||||
name: ascn-cluster
|
||||
location: "{{ gcp_zone }}"
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_auth_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
state: absent
|
||||
register: cluster
|
||||
until: "cluster is not failed"
|
||||
delay: 60
|
||||
retries: 3
|
||||
|
||||
- name: Verify that the cluster was deleted
|
||||
gcp_container_cluster_info:
|
||||
location: "{{ gcp_zone }}"
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_auth_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
scopes:
|
||||
- https://www.googleapis.com/auth/cloud-platform
|
||||
register: results
|
||||
|
||||
- name: Verify that the command succeeded
|
||||
assert:
|
||||
that:
|
||||
- '''ascn-cluster'' not in "{{ results[''resources''] | map(attribute=''name'')
|
||||
| list }}"'
|
Loading…
Add table
Add a link
Reference in a new issue