# 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 }}"'