You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
765 B

  1. ---
  2. - hosts: localhost
  3. become: false
  4. gather_facts: no
  5. vars:
  6. cloud_machine_type: f1-micro
  7. tasks:
  8. - name: replace_test_id
  9. set_fact:
  10. test_name: "{{test_id |regex_replace('\\.', '-')}}"
  11. - name: delete gce instances
  12. gce:
  13. instance_names: "k8s-{{test_name}}-1,k8s-{{test_name}}-2,k8s-{{test_name}}-3"
  14. machine_type: "{{ cloud_machine_type }}"
  15. image: "{{ cloud_image }}"
  16. service_account_email: "{{ gce_service_account_email }}"
  17. pem_file: "{{ gce_pem_file }}"
  18. project_id: "{{ gce_project_id }}"
  19. zone: "{{cloud_region | default('europe-west1-b')}}"
  20. metadata: '{"test_id": "{{test_id}}", "network": "{{kube_network_plugin}}"}'
  21. state: 'absent'
  22. register: gce