622537bd33
* Run CI triggers in one step * Run all test matrix for triggers * Switch back to g1-small Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
32 lines
1,003 B
YAML
32 lines
1,003 B
YAML
---
|
|
- hosts: localhost
|
|
become: false
|
|
gather_facts: no
|
|
vars:
|
|
mode: default
|
|
|
|
tasks:
|
|
- name: replace_test_id
|
|
set_fact:
|
|
test_name: "{{test_id |regex_replace('\\.', '-')}}"
|
|
|
|
- set_fact:
|
|
instance_names: >-
|
|
{%- if mode in ['separate', 'ha'] -%}
|
|
k8s-{{test_name}}-1,k8s-{{test_name}}-2,k8s-{{test_name}}-3
|
|
{%- else -%}
|
|
k8s-{{test_name}}-1,k8s-{{test_name}}-2
|
|
{%- endif -%}
|
|
|
|
- name: delete gce instances
|
|
gce:
|
|
instance_names: "{{instance_names}}"
|
|
image: "{{ cloud_image }}"
|
|
service_account_email: "{{ gce_service_account_email }}"
|
|
pem_file: "{{ gce_pem_file | default(omit)}}"
|
|
credentials_file: "{{gce_credentials_file | default(omit)}}"
|
|
project_id: "{{ gce_project_id }}"
|
|
zone: "{{cloud_region | default('europe-west1-b')}}"
|
|
metadata: '{"test_id": "{{test_id}}", "network": "{{kube_network_plugin}}"}'
|
|
state: 'absent'
|
|
register: gce
|