mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-10-02 22:43:32 -07:00
1. creates instances with a custom ssh keypair 2. change the connection plugin method and perform basic checks 3. cleanup
31 lines
514 B
Django/Jinja
31 lines
514 B
Django/Jinja
---
|
|
plugin: google.cloud.gcp_compute
|
|
|
|
zones:
|
|
{{ gcp_zones | to_nice_yaml }}
|
|
|
|
projects:
|
|
- {{ gcp_project }}
|
|
|
|
auth_kind: {{ gcp_cred_kind }}
|
|
|
|
service_account_file: {{ gcp_cred_file }}
|
|
|
|
scopes:
|
|
- 'https://www.googleapis.com/auth/cloud-platform'
|
|
- 'https://www.googleapis.com/auth/compute.readonly'
|
|
|
|
keyed_groups:
|
|
- prefix: gcp
|
|
key: labels
|
|
|
|
filters:
|
|
- 'labels.test:{{ prefix }}'
|
|
|
|
hostnames:
|
|
- name
|
|
|
|
# set variables for the connection plugin
|
|
compose:
|
|
ansible_gcloud_zone: zone
|
|
ansible_gcloud_project: project
|