mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-06 10:50:28 -07:00
tests: enable more tests (#506)
Enabling and fixing the following: gcp_tpu_node gcp_storage_bucket gcp_spanner_instance gcp_kms_key_ring gcp_redis_instance gcp_iam_service_account gcp_compute_ssl_certificate
This commit is contained in:
commit
d802c99959
22 changed files with 56 additions and 61 deletions
|
@ -133,7 +133,6 @@ EXAMPLES = '''
|
||||||
- name: create a SSL certificate
|
- name: create a SSL certificate
|
||||||
google.cloud.gcp_compute_ssl_certificate:
|
google.cloud.gcp_compute_ssl_certificate:
|
||||||
name: test_object
|
name: test_object
|
||||||
region: us-central1
|
|
||||||
description: A certificate for testing. Do not use this certificate in production
|
description: A certificate for testing. Do not use this certificate in production
|
||||||
certificate: |-
|
certificate: |-
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
|
|
|
@ -134,7 +134,7 @@ EXAMPLES = '''
|
||||||
- name: create a project
|
- name: create a project
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: serviceaccount
|
auth_kind: serviceaccount
|
||||||
service_account_file: "/tmp/auth.pem"
|
service_account_file: "/tmp/auth.pem"
|
||||||
parent:
|
parent:
|
||||||
|
|
|
@ -21,6 +21,7 @@ SERVICE_LIST=(
|
||||||
"dns"
|
"dns"
|
||||||
"file.googleapis.com"
|
"file.googleapis.com"
|
||||||
"ml.googleapis.com"
|
"ml.googleapis.com"
|
||||||
|
"redis.googleapis.com"
|
||||||
"runtimeconfig.googleapis.com"
|
"runtimeconfig.googleapis.com"
|
||||||
"sourcerepo.googleapis.com"
|
"sourcerepo.googleapis.com"
|
||||||
"spanner.googleapis.com"
|
"spanner.googleapis.com"
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
|
|
@ -1 +1,2 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
|
unsupported
|
|
@ -1,2 +1 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
|
|
@ -16,7 +16,6 @@
|
||||||
- name: delete a SSL certificate
|
- name: delete a SSL certificate
|
||||||
google.cloud.gcp_compute_ssl_certificate:
|
google.cloud.gcp_compute_ssl_certificate:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
region: us-central1
|
|
||||||
description: A certificate for testing. Do not use this certificate in production
|
description: A certificate for testing. Do not use this certificate in production
|
||||||
certificate: |-
|
certificate: |-
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
|
@ -50,7 +49,6 @@
|
||||||
- name: create a SSL certificate
|
- name: create a SSL certificate
|
||||||
google.cloud.gcp_compute_ssl_certificate:
|
google.cloud.gcp_compute_ssl_certificate:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
region: us-central1
|
|
||||||
description: A certificate for testing. Do not use this certificate in production
|
description: A certificate for testing. Do not use this certificate in production
|
||||||
certificate: |-
|
certificate: |-
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
|
@ -103,7 +101,6 @@
|
||||||
- name: create a SSL certificate that already exists
|
- name: create a SSL certificate that already exists
|
||||||
google.cloud.gcp_compute_ssl_certificate:
|
google.cloud.gcp_compute_ssl_certificate:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
region: us-central1
|
|
||||||
description: A certificate for testing. Do not use this certificate in production
|
description: A certificate for testing. Do not use this certificate in production
|
||||||
certificate: |-
|
certificate: |-
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
|
@ -142,7 +139,6 @@
|
||||||
- name: delete a SSL certificate
|
- name: delete a SSL certificate
|
||||||
google.cloud.gcp_compute_ssl_certificate:
|
google.cloud.gcp_compute_ssl_certificate:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
region: us-central1
|
|
||||||
description: A certificate for testing. Do not use this certificate in production
|
description: A certificate for testing. Do not use this certificate in production
|
||||||
certificate: |-
|
certificate: |-
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
|
@ -195,7 +191,6 @@
|
||||||
- name: delete a SSL certificate that does not exist
|
- name: delete a SSL certificate that does not exist
|
||||||
google.cloud.gcp_compute_ssl_certificate:
|
google.cloud.gcp_compute_ssl_certificate:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
region: us-central1
|
|
||||||
description: A certificate for testing. Do not use this certificate in production
|
description: A certificate for testing. Do not use this certificate in production
|
||||||
certificate: |-
|
certificate: |-
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
|
|
@ -15,7 +15,7 @@
|
||||||
# Pre-test setup
|
# Pre-test setup
|
||||||
- name: delete a service account
|
- name: delete a service account
|
||||||
google.cloud.gcp_iam_service_account:
|
google.cloud.gcp_iam_service_account:
|
||||||
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
|
name: sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com
|
||||||
display_name: My Ansible test key
|
display_name: My Ansible test key
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
- name: create a service account
|
- name: create a service account
|
||||||
google.cloud.gcp_iam_service_account:
|
google.cloud.gcp_iam_service_account:
|
||||||
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
|
name: sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com
|
||||||
display_name: My Ansible test key
|
display_name: My Ansible test key
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
|
@ -46,11 +46,11 @@
|
||||||
- name: verify that command succeeded
|
- name: verify that command succeeded
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- results['resources'] | map(attribute='name') | select("match", ".*sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com.*") | list | length == 1
|
- results['resources'] | map(attribute='name') | select("match", ".*sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com.*") | list | length == 1
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
- name: create a service account that already exists
|
- name: create a service account that already exists
|
||||||
google.cloud.gcp_iam_service_account:
|
google.cloud.gcp_iam_service_account:
|
||||||
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
|
name: sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com
|
||||||
display_name: My Ansible test key
|
display_name: My Ansible test key
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
- name: delete a service account
|
- name: delete a service account
|
||||||
google.cloud.gcp_iam_service_account:
|
google.cloud.gcp_iam_service_account:
|
||||||
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
|
name: sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com
|
||||||
display_name: My Ansible test key
|
display_name: My Ansible test key
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
|
@ -86,11 +86,11 @@
|
||||||
- name: verify that command succeeded
|
- name: verify that command succeeded
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- results['resources'] | map(attribute='name') | select("match", ".*sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com.*") | list | length == 0
|
- results['resources'] | map(attribute='name') | select("match", ".*sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com.*") | list | length == 0
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
- name: delete a service account that does not exist
|
- name: delete a service account that does not exist
|
||||||
google.cloud.gcp_iam_service_account:
|
google.cloud.gcp_iam_service_account:
|
||||||
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
|
name: sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com
|
||||||
display_name: My Ansible test key
|
display_name: My Ansible test key
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
|
|
@ -1,2 +1,2 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
unsupported
|
|
@ -1,2 +1 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
|
|
@ -19,6 +19,7 @@
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
auto_create_subnetworks: true
|
||||||
state: present
|
state: present
|
||||||
register: network
|
register: network
|
||||||
- name: delete a instance
|
- name: delete a instance
|
||||||
|
@ -165,6 +166,7 @@
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
auto_create_subnetworks: true
|
||||||
state: absent
|
state: absent
|
||||||
register: network
|
register: network
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
unsupported
|
|
@ -16,7 +16,7 @@
|
||||||
- name: delete a project
|
- name: delete a project
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
parent:
|
parent:
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
- name: create a project
|
- name: create a project
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
parent:
|
parent:
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
- name: create a project that already exists
|
- name: create a project that already exists
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
parent:
|
parent:
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
- name: delete a project
|
- name: delete a project
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
parent:
|
parent:
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
- name: delete a project that does not exist
|
- name: delete a project that does not exist
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
parent:
|
parent:
|
||||||
|
|
|
@ -71,6 +71,11 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result.changed == true
|
- result.changed == true
|
||||||
|
# TODO(@toumorokoshi): investigate if the pause helps
|
||||||
|
# prevent quota issues.
|
||||||
|
# - name: Pause for 1 minute to keep from hitting quota limit
|
||||||
|
# ansible.builtin.pause:
|
||||||
|
# minutes: 1
|
||||||
- name: verify that service was deleted
|
- name: verify that service was deleted
|
||||||
google.cloud.gcp_serviceusage_service_info:
|
google.cloud.gcp_serviceusage_service_info:
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
|
|
@ -1,2 +1 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
|
|
@ -1,2 +1,2 @@
|
||||||
---
|
---
|
||||||
resource_name: "{{ resource_prefix }}"
|
resource_name: "{{ gcp_project }}-ansible-test-bucket"
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
# Pre-test setup
|
# Pre-test setup
|
||||||
- name: delete a bucket
|
- name: delete a bucket
|
||||||
google.cloud.gcp_storage_bucket:
|
google.cloud.gcp_storage_bucket:
|
||||||
name: ansible-storage-module
|
name: "{{ resource_name }}"
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
- name: create a bucket
|
- name: create a bucket
|
||||||
google.cloud.gcp_storage_bucket:
|
google.cloud.gcp_storage_bucket:
|
||||||
name: ansible-storage-module
|
name: "{{ resource_name }}"
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
- name: create a bucket that already exists
|
- name: create a bucket that already exists
|
||||||
google.cloud.gcp_storage_bucket:
|
google.cloud.gcp_storage_bucket:
|
||||||
name: ansible-storage-module
|
name: "{{ resource_name }}"
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
- name: delete a bucket
|
- name: delete a bucket
|
||||||
google.cloud.gcp_storage_bucket:
|
google.cloud.gcp_storage_bucket:
|
||||||
name: ansible-storage-module
|
name: "{{ resource_name }}"
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
- name: delete a bucket that does not exist
|
- name: delete a bucket that does not exist
|
||||||
google.cloud.gcp_storage_bucket:
|
google.cloud.gcp_storage_bucket:
|
||||||
name: ansible-storage-module
|
name: "{{ resource_name }}"
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
|
|
@ -16,9 +16,9 @@
|
||||||
- name: delete a node
|
- name: delete a node
|
||||||
google.cloud.gcp_tpu_node:
|
google.cloud.gcp_tpu_node:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
zone: us-central1-b
|
zone: us-central1-a
|
||||||
accelerator_type: v3-8
|
accelerator_type: "v2-32"
|
||||||
tensorflow_version: '1.11'
|
tensorflow_version: '2.10.0'
|
||||||
cidr_block: 10.2.0.0/29
|
cidr_block: 10.2.0.0/29
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
|
@ -28,9 +28,9 @@
|
||||||
- name: create a node
|
- name: create a node
|
||||||
google.cloud.gcp_tpu_node:
|
google.cloud.gcp_tpu_node:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
zone: us-central1-b
|
zone: us-central1-a
|
||||||
accelerator_type: v3-8
|
accelerator_type: "v2-32"
|
||||||
tensorflow_version: '1.11'
|
tensorflow_version: '2.10.0'
|
||||||
cidr_block: 10.2.0.0/29
|
cidr_block: 10.2.0.0/29
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
- result.changed == true
|
- result.changed == true
|
||||||
- name: verify that node was created
|
- name: verify that node was created
|
||||||
google.cloud.gcp_tpu_node_info:
|
google.cloud.gcp_tpu_node_info:
|
||||||
zone: us-central1-b
|
zone: us-central1-a
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
@ -58,9 +58,9 @@
|
||||||
- name: create a node that already exists
|
- name: create a node that already exists
|
||||||
google.cloud.gcp_tpu_node:
|
google.cloud.gcp_tpu_node:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
zone: us-central1-b
|
zone: us-central1-a
|
||||||
accelerator_type: v3-8
|
accelerator_type: "v2-32"
|
||||||
tensorflow_version: '1.11'
|
tensorflow_version: '2.10.0'
|
||||||
cidr_block: 10.2.0.0/29
|
cidr_block: 10.2.0.0/29
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
|
@ -75,9 +75,9 @@
|
||||||
- name: delete a node
|
- name: delete a node
|
||||||
google.cloud.gcp_tpu_node:
|
google.cloud.gcp_tpu_node:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
zone: us-central1-b
|
zone: us-central1-a
|
||||||
accelerator_type: v3-8
|
accelerator_type: "v2-32"
|
||||||
tensorflow_version: '1.11'
|
tensorflow_version: '2.10.0'
|
||||||
cidr_block: 10.2.0.0/29
|
cidr_block: 10.2.0.0/29
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
- result.changed == true
|
- result.changed == true
|
||||||
- name: verify that node was deleted
|
- name: verify that node was deleted
|
||||||
google.cloud.gcp_tpu_node_info:
|
google.cloud.gcp_tpu_node_info:
|
||||||
zone: us-central1-b
|
zone: us-central1-a
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
@ -105,9 +105,9 @@
|
||||||
- name: delete a node that does not exist
|
- name: delete a node that does not exist
|
||||||
google.cloud.gcp_tpu_node:
|
google.cloud.gcp_tpu_node:
|
||||||
name: "{{ resource_name }}"
|
name: "{{ resource_name }}"
|
||||||
zone: us-central1-b
|
zone: us-central1-a
|
||||||
accelerator_type: v3-8
|
accelerator_type: "v2-32"
|
||||||
tensorflow_version: '1.11'
|
tensorflow_version: '2.10.0'
|
||||||
cidr_block: 10.2.0.0/29
|
cidr_block: 10.2.0.0/29
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue