Adding namespace on integration tests + examples

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
Alex Stephen 2019-09-30 22:08:25 +00:00 committed by Modular Magician
commit 516fada880
130 changed files with 570 additions and 570 deletions

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a firewall rule
gcp_appengine_firewall_rule:
google.cloud.gcp_appengine_firewall_rule:
priority: 1000
source_range: 10.0.0.0
action: ALLOW
@ -24,7 +24,7 @@
state: absent
#----------------------------------------------------------
- name: create a firewall rule
gcp_appengine_firewall_rule:
google.cloud.gcp_appengine_firewall_rule:
priority: 1000
source_range: 10.0.0.0
action: ALLOW
@ -51,7 +51,7 @@
- results['resources'] | length >= 1
# ----------------------------------------------------------------------------
- name: create a firewall rule that already exists
gcp_appengine_firewall_rule:
google.cloud.gcp_appengine_firewall_rule:
priority: 1000
source_range: 10.0.0.0
action: ALLOW
@ -66,7 +66,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a firewall rule
gcp_appengine_firewall_rule:
google.cloud.gcp_appengine_firewall_rule:
priority: 1000
source_range: 10.0.0.0
action: ALLOW
@ -93,7 +93,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a firewall rule that does not exist
gcp_appengine_firewall_rule:
google.cloud.gcp_appengine_firewall_rule:
priority: 1000
source_range: 10.0.0.0
action: ALLOW

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a dataset
gcp_bigquery_dataset:
google.cloud.gcp_bigquery_dataset:
name: my_example_dataset
dataset_reference:
dataset_id: my_example_dataset
@ -24,7 +24,7 @@
state: absent
#----------------------------------------------------------
- name: create a dataset
gcp_bigquery_dataset:
google.cloud.gcp_bigquery_dataset:
name: my_example_dataset
dataset_reference:
dataset_id: my_example_dataset
@ -51,7 +51,7 @@
- results['resources'] | map(attribute='datasetReference') | map(attribute='datasetId') | select("match", ".*my_example_dataset.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a dataset that already exists
gcp_bigquery_dataset:
google.cloud.gcp_bigquery_dataset:
name: my_example_dataset
dataset_reference:
dataset_id: my_example_dataset
@ -66,7 +66,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a dataset
gcp_bigquery_dataset:
google.cloud.gcp_bigquery_dataset:
name: my_example_dataset
dataset_reference:
dataset_id: my_example_dataset
@ -93,7 +93,7 @@
- results['resources'] | map(attribute='datasetReference') | map(attribute='datasetId') | select("match", ".*my_example_dataset.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a dataset that does not exist
gcp_bigquery_dataset:
google.cloud.gcp_bigquery_dataset:
name: my_example_dataset
dataset_reference:
dataset_id: my_example_dataset

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a dataset
gcp_bigquery_dataset:
google.cloud.gcp_bigquery_dataset:
name: example_dataset
dataset_reference:
dataset_id: example_dataset
@ -24,7 +24,7 @@
state: present
register: dataset
- name: delete a table
gcp_bigquery_table:
google.cloud.gcp_bigquery_table:
name: example_table
dataset: example_dataset
table_reference:
@ -37,7 +37,7 @@
state: absent
#----------------------------------------------------------
- name: create a table
gcp_bigquery_table:
google.cloud.gcp_bigquery_table:
name: example_table
dataset: example_dataset
table_reference:
@ -68,7 +68,7 @@
- results['resources'] | map(attribute='tableReference') | map(attribute='tableId') | select("match", ".*example_table.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a table that already exists
gcp_bigquery_table:
google.cloud.gcp_bigquery_table:
name: example_table
dataset: example_dataset
table_reference:
@ -86,7 +86,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a table
gcp_bigquery_table:
google.cloud.gcp_bigquery_table:
name: example_table
dataset: example_dataset
table_reference:
@ -117,7 +117,7 @@
- results['resources'] | map(attribute='tableReference') | map(attribute='tableId') | select("match", ".*example_table.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a table that does not exist
gcp_bigquery_table:
google.cloud.gcp_bigquery_table:
name: example_table
dataset: example_dataset
table_reference:
@ -137,7 +137,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a dataset
gcp_bigquery_dataset:
google.cloud.gcp_bigquery_dataset:
name: example_dataset
dataset_reference:
dataset_id: example_dataset

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a cloud function
gcp_cloudfunctions_cloud_function:
google.cloud.gcp_cloudfunctions_cloud_function:
name: "{{ resource_name }}"
location: us-central1
entry_point: helloGET
@ -26,7 +26,7 @@
state: absent
#----------------------------------------------------------
- name: create a cloud function
gcp_cloudfunctions_cloud_function:
google.cloud.gcp_cloudfunctions_cloud_function:
name: "{{ resource_name }}"
location: us-central1
entry_point: helloGET
@ -56,7 +56,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a cloud function that already exists
gcp_cloudfunctions_cloud_function:
google.cloud.gcp_cloudfunctions_cloud_function:
name: "{{ resource_name }}"
location: us-central1
entry_point: helloGET
@ -73,7 +73,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a cloud function
gcp_cloudfunctions_cloud_function:
google.cloud.gcp_cloudfunctions_cloud_function:
name: "{{ resource_name }}"
location: us-central1
entry_point: helloGET
@ -103,7 +103,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a cloud function that does not exist
gcp_cloudfunctions_cloud_function:
google.cloud.gcp_cloudfunctions_cloud_function:
name: "{{ resource_name }}"
location: us-central1
entry_point: helloGET

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a job
gcp_cloudscheduler_job:
google.cloud.gcp_cloudscheduler_job:
name: job
region: us-central1
schedule: "*/4 * * * *"
@ -33,7 +33,7 @@
state: absent
#----------------------------------------------------------
- name: create a job
gcp_cloudscheduler_job:
google.cloud.gcp_cloudscheduler_job:
name: job
region: us-central1
schedule: "*/4 * * * *"
@ -70,7 +70,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*job.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a job that already exists
gcp_cloudscheduler_job:
google.cloud.gcp_cloudscheduler_job:
name: job
region: us-central1
schedule: "*/4 * * * *"
@ -94,7 +94,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a job
gcp_cloudscheduler_job:
google.cloud.gcp_cloudscheduler_job:
name: job
region: us-central1
schedule: "*/4 * * * *"
@ -131,7 +131,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*job.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a job that does not exist
gcp_cloudscheduler_job:
google.cloud.gcp_cloudscheduler_job:
name: job
region: us-central1
schedule: "*/4 * * * *"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a queue
gcp_cloudtasks_queue:
google.cloud.gcp_cloudtasks_queue:
name: "{{ resource_name }}"
location: us-central1
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: absent
#----------------------------------------------------------
- name: create a queue
gcp_cloudtasks_queue:
google.cloud.gcp_cloudtasks_queue:
name: "{{ resource_name }}"
location: us-central1
project: "{{ gcp_project }}"
@ -50,7 +50,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a queue that already exists
gcp_cloudtasks_queue:
google.cloud.gcp_cloudtasks_queue:
name: "{{ resource_name }}"
location: us-central1
project: "{{ gcp_project }}"
@ -64,7 +64,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a queue
gcp_cloudtasks_queue:
google.cloud.gcp_cloudtasks_queue:
name: "{{ resource_name }}"
location: us-central1
project: "{{ gcp_project }}"
@ -91,7 +91,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a queue that does not exist
gcp_cloudtasks_queue:
google.cloud.gcp_cloudtasks_queue:
name: "{{ resource_name }}"
location: us-central1
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: test-address1
region: us-west1
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: absent
#----------------------------------------------------------
- name: create a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: test-address1
region: us-west1
project: "{{ gcp_project }}"
@ -52,7 +52,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a address that already exists
gcp_compute_address:
google.cloud.gcp_compute_address:
name: test-address1
region: us-west1
project: "{{ gcp_project }}"
@ -66,7 +66,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: test-address1
region: us-west1
project: "{{ gcp_project }}"
@ -95,7 +95,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a address that does not exist
gcp_compute_address:
google.cloud.gcp_compute_address:
name: test-address1
region: us-west1
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instancetemplate
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: network
- name: create a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-instancetemplate
region: us-central1
project: "{{ gcp_project }}"
@ -31,7 +31,7 @@
state: present
register: address
- name: create a instance template
gcp_compute_instance_template:
google.cloud.gcp_compute_instance_template:
name: "{{ resource_name }}"
properties:
disks:
@ -52,7 +52,7 @@
state: present
register: instancetemplate
- name: create a instance group manager
gcp_compute_instance_group_manager:
google.cloud.gcp_compute_instance_group_manager:
name: "{{ resource_name }}"
base_instance_name: test1-child
instance_template: "{{ instancetemplate }}"
@ -64,7 +64,7 @@
state: present
register: igm
- name: delete a autoscaler
gcp_compute_autoscaler:
google.cloud.gcp_compute_autoscaler:
name: "{{ resource_name }}"
zone: us-central1-a
target: "{{ igm }}"
@ -80,7 +80,7 @@
state: absent
#----------------------------------------------------------
- name: create a autoscaler
gcp_compute_autoscaler:
google.cloud.gcp_compute_autoscaler:
name: "{{ resource_name }}"
zone: us-central1-a
target: "{{ igm }}"
@ -116,7 +116,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a autoscaler that already exists
gcp_compute_autoscaler:
google.cloud.gcp_compute_autoscaler:
name: "{{ resource_name }}"
zone: us-central1-a
target: "{{ igm }}"
@ -137,7 +137,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a autoscaler
gcp_compute_autoscaler:
google.cloud.gcp_compute_autoscaler:
name: "{{ resource_name }}"
zone: us-central1-a
target: "{{ igm }}"
@ -173,7 +173,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a autoscaler that does not exist
gcp_compute_autoscaler:
google.cloud.gcp_compute_autoscaler:
name: "{{ resource_name }}"
zone: us-central1-a
target: "{{ igm }}"
@ -196,7 +196,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a instance group manager
gcp_compute_instance_group_manager:
google.cloud.gcp_compute_instance_group_manager:
name: "{{ resource_name }}"
base_instance_name: test1-child
instance_template: "{{ instancetemplate }}"
@ -209,7 +209,7 @@
register: igm
ignore_errors: true
- name: delete a instance template
gcp_compute_instance_template:
google.cloud.gcp_compute_instance_template:
name: "{{ resource_name }}"
properties:
disks:
@ -231,7 +231,7 @@
register: instancetemplate
ignore_errors: true
- name: delete a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-instancetemplate
region: us-central1
project: "{{ gcp_project }}"
@ -241,7 +241,7 @@
register: address
ignore_errors: true
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instancetemplate
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a bucket
gcp_storage_bucket:
google.cloud.gcp_storage_bucket:
name: bucket-backendbucket
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: bucket
- name: delete a backend bucket
gcp_compute_backend_bucket:
google.cloud.gcp_compute_backend_bucket:
name: "{{ resource_name }}"
bucket_name: "{{ bucket.name }}"
description: A BackendBucket to connect LNB w/ Storage Bucket
@ -33,7 +33,7 @@
state: absent
#----------------------------------------------------------
- name: create a backend bucket
gcp_compute_backend_bucket:
google.cloud.gcp_compute_backend_bucket:
name: "{{ resource_name }}"
bucket_name: "{{ bucket.name }}"
description: A BackendBucket to connect LNB w/ Storage Bucket
@ -63,7 +63,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a backend bucket that already exists
gcp_compute_backend_bucket:
google.cloud.gcp_compute_backend_bucket:
name: "{{ resource_name }}"
bucket_name: "{{ bucket.name }}"
description: A BackendBucket to connect LNB w/ Storage Bucket
@ -79,7 +79,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a backend bucket
gcp_compute_backend_bucket:
google.cloud.gcp_compute_backend_bucket:
name: "{{ resource_name }}"
bucket_name: "{{ bucket.name }}"
description: A BackendBucket to connect LNB w/ Storage Bucket
@ -109,7 +109,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a backend bucket that does not exist
gcp_compute_backend_bucket:
google.cloud.gcp_compute_backend_bucket:
name: "{{ resource_name }}"
bucket_name: "{{ bucket.name }}"
description: A BackendBucket to connect LNB w/ Storage Bucket
@ -127,7 +127,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a bucket
gcp_storage_bucket:
google.cloud.gcp_storage_bucket:
name: bucket-backendbucket
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-backendservice
zone: us-central1-a
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: instancegroup
- name: create a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-backendservice
healthy_threshold: 10
port: 8080
@ -35,7 +35,7 @@
state: present
register: healthcheck
- name: delete a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: "{{ resource_name }}"
backends:
- group: "{{ instancegroup.selfLink }}"
@ -48,7 +48,7 @@
state: absent
#----------------------------------------------------------
- name: create a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: "{{ resource_name }}"
backends:
- group: "{{ instancegroup.selfLink }}"
@ -80,7 +80,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a backend service that already exists
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: "{{ resource_name }}"
backends:
- group: "{{ instancegroup.selfLink }}"
@ -98,7 +98,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: "{{ resource_name }}"
backends:
- group: "{{ instancegroup.selfLink }}"
@ -130,7 +130,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a backend service that does not exist
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: "{{ resource_name }}"
backends:
- group: "{{ instancegroup.selfLink }}"
@ -150,7 +150,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-backendservice
healthy_threshold: 10
port: 8080
@ -163,7 +163,7 @@
register: healthcheck
ignore_errors: true
- name: delete a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-backendservice
zone: us-central1-a
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a disk
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: "{{ resource_name }}"
size_gb: 50
disk_encryption_key:
@ -26,7 +26,7 @@
state: absent
#----------------------------------------------------------
- name: create a disk
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: "{{ resource_name }}"
size_gb: 50
disk_encryption_key:
@ -58,7 +58,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a disk that already exists
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: "{{ resource_name }}"
size_gb: 50
disk_encryption_key:
@ -75,7 +75,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a disk
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: "{{ resource_name }}"
size_gb: 50
disk_encryption_key:
@ -107,7 +107,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a disk that does not exist
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: "{{ resource_name }}"
size_gb: 50
disk_encryption_key:

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a firewall
gcp_compute_firewall:
google.cloud.gcp_compute_firewall:
name: "{{ resource_name }}"
allowed:
- ip_protocol: tcp
@ -31,7 +31,7 @@
state: absent
#----------------------------------------------------------
- name: create a firewall
gcp_compute_firewall:
google.cloud.gcp_compute_firewall:
name: "{{ resource_name }}"
allowed:
- ip_protocol: tcp
@ -67,7 +67,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a firewall that already exists
gcp_compute_firewall:
google.cloud.gcp_compute_firewall:
name: "{{ resource_name }}"
allowed:
- ip_protocol: tcp
@ -89,7 +89,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a firewall
gcp_compute_firewall:
google.cloud.gcp_compute_firewall:
name: "{{ resource_name }}"
allowed:
- ip_protocol: tcp
@ -125,7 +125,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a firewall that does not exist
gcp_compute_firewall:
google.cloud.gcp_compute_firewall:
name: "{{ resource_name }}"
allowed:
- ip_protocol: tcp

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-forwardingrule
region: us-west1
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: address
- name: create a target pool
gcp_compute_target_pool:
google.cloud.gcp_compute_target_pool:
name: targetpool-forwardingrule
region: us-west1
project: "{{ gcp_project }}"
@ -32,7 +32,7 @@
state: present
register: targetpool
- name: delete a forwarding rule
gcp_compute_forwarding_rule:
google.cloud.gcp_compute_forwarding_rule:
name: "{{ resource_name }}"
region: us-west1
target: "{{ targetpool }}"
@ -45,7 +45,7 @@
state: absent
#----------------------------------------------------------
- name: create a forwarding rule
gcp_compute_forwarding_rule:
google.cloud.gcp_compute_forwarding_rule:
name: "{{ resource_name }}"
region: us-west1
target: "{{ targetpool }}"
@ -78,7 +78,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a forwarding rule that already exists
gcp_compute_forwarding_rule:
google.cloud.gcp_compute_forwarding_rule:
name: "{{ resource_name }}"
region: us-west1
target: "{{ targetpool }}"
@ -96,7 +96,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a forwarding rule
gcp_compute_forwarding_rule:
google.cloud.gcp_compute_forwarding_rule:
name: "{{ resource_name }}"
region: us-west1
target: "{{ targetpool }}"
@ -129,7 +129,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a forwarding rule that does not exist
gcp_compute_forwarding_rule:
google.cloud.gcp_compute_forwarding_rule:
name: "{{ resource_name }}"
region: us-west1
target: "{{ targetpool }}"
@ -149,7 +149,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a target pool
gcp_compute_target_pool:
google.cloud.gcp_compute_target_pool:
name: targetpool-forwardingrule
region: us-west1
project: "{{ gcp_project }}"
@ -159,7 +159,7 @@
register: targetpool
ignore_errors: true
- name: delete a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-forwardingrule
region: us-west1
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a global address
gcp_compute_global_address:
google.cloud.gcp_compute_global_address:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: absent
#----------------------------------------------------------
- name: create a global address
gcp_compute_global_address:
google.cloud.gcp_compute_global_address:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -49,7 +49,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a global address that already exists
gcp_compute_global_address:
google.cloud.gcp_compute_global_address:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -62,7 +62,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a global address
gcp_compute_global_address:
google.cloud.gcp_compute_global_address:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -89,7 +89,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a global address that does not exist
gcp_compute_global_address:
google.cloud.gcp_compute_global_address:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a global address
gcp_compute_global_address:
google.cloud.gcp_compute_global_address:
name: globaladdress-globalforwardingrule
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: globaladdress
- name: create a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-globalforwardingrule
zone: us-central1-a
project: "{{ gcp_project }}"
@ -31,7 +31,7 @@
state: present
register: instancegroup
- name: create a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-globalforwardingrule
healthy_threshold: 10
port: 8080
@ -43,7 +43,7 @@
state: present
register: healthcheck
- name: create a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-globalforwardingrule
backends:
- group: "{{ instancegroup.selfLink }}"
@ -56,7 +56,7 @@
state: present
register: backendservice
- name: create a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: urlmap-globalforwardingrule
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -65,7 +65,7 @@
state: present
register: urlmap
- name: create a target HTTP proxy
gcp_compute_target_http_proxy:
google.cloud.gcp_compute_target_http_proxy:
name: targethttpproxy-globalforwardingrule
url_map: "{{ urlmap }}"
project: "{{ gcp_project }}"
@ -74,7 +74,7 @@
state: present
register: httpproxy
- name: delete a global forwarding rule
gcp_compute_global_forwarding_rule:
google.cloud.gcp_compute_global_forwarding_rule:
name: "{{ resource_name }}"
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
@ -86,7 +86,7 @@
state: absent
#----------------------------------------------------------
- name: create a global forwarding rule
gcp_compute_global_forwarding_rule:
google.cloud.gcp_compute_global_forwarding_rule:
name: "{{ resource_name }}"
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
@ -117,7 +117,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a global forwarding rule that already exists
gcp_compute_global_forwarding_rule:
google.cloud.gcp_compute_global_forwarding_rule:
name: "{{ resource_name }}"
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
@ -134,7 +134,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a global forwarding rule
gcp_compute_global_forwarding_rule:
google.cloud.gcp_compute_global_forwarding_rule:
name: "{{ resource_name }}"
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
@ -165,7 +165,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a global forwarding rule that does not exist
gcp_compute_global_forwarding_rule:
google.cloud.gcp_compute_global_forwarding_rule:
name: "{{ resource_name }}"
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
@ -184,7 +184,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a target HTTP proxy
gcp_compute_target_http_proxy:
google.cloud.gcp_compute_target_http_proxy:
name: targethttpproxy-globalforwardingrule
url_map: "{{ urlmap }}"
project: "{{ gcp_project }}"
@ -194,7 +194,7 @@
register: httpproxy
ignore_errors: true
- name: delete a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: urlmap-globalforwardingrule
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -204,7 +204,7 @@
register: urlmap
ignore_errors: true
- name: delete a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-globalforwardingrule
backends:
- group: "{{ instancegroup.selfLink }}"
@ -218,7 +218,7 @@
register: backendservice
ignore_errors: true
- name: delete a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-globalforwardingrule
healthy_threshold: 10
port: 8080
@ -231,7 +231,7 @@
register: healthcheck
ignore_errors: true
- name: delete a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-globalforwardingrule
zone: us-central1-a
project: "{{ gcp_project }}"
@ -241,7 +241,7 @@
register: instancegroup
ignore_errors: true
- name: delete a global address
gcp_compute_global_address:
google.cloud.gcp_compute_global_address:
name: globaladdress-globalforwardingrule
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a health check
gcp_compute_health_check:
google.cloud.gcp_compute_health_check:
name: "{{ resource_name }}"
type: TCP
tcp_health_check:
@ -30,7 +30,7 @@
state: absent
#----------------------------------------------------------
- name: create a health check
gcp_compute_health_check:
google.cloud.gcp_compute_health_check:
name: "{{ resource_name }}"
type: TCP
tcp_health_check:
@ -65,7 +65,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a health check that already exists
gcp_compute_health_check:
google.cloud.gcp_compute_health_check:
name: "{{ resource_name }}"
type: TCP
tcp_health_check:
@ -86,7 +86,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a health check
gcp_compute_health_check:
google.cloud.gcp_compute_health_check:
name: "{{ resource_name }}"
type: TCP
tcp_health_check:
@ -121,7 +121,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a health check that does not exist
gcp_compute_health_check:
google.cloud.gcp_compute_health_check:
name: "{{ resource_name }}"
type: TCP
tcp_health_check:

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: "{{ resource_name }}"
healthy_threshold: 10
port: 8080
@ -26,7 +26,7 @@
state: absent
#----------------------------------------------------------
- name: create a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: "{{ resource_name }}"
healthy_threshold: 10
port: 8080
@ -57,7 +57,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a HTTP health check that already exists
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: "{{ resource_name }}"
healthy_threshold: 10
port: 8080
@ -74,7 +74,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: "{{ resource_name }}"
healthy_threshold: 10
port: 8080
@ -105,7 +105,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a HTTP health check that does not exist
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: "{{ resource_name }}"
healthy_threshold: 10
port: 8080

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a HTTPS health check
gcp_compute_https_health_check:
google.cloud.gcp_compute_https_health_check:
name: "{{ resource_name }}"
healthy_threshold: 10
port: 8080
@ -26,7 +26,7 @@
state: absent
#----------------------------------------------------------
- name: create a HTTPS health check
gcp_compute_https_health_check:
google.cloud.gcp_compute_https_health_check:
name: "{{ resource_name }}"
healthy_threshold: 10
port: 8080
@ -57,7 +57,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a HTTPS health check that already exists
gcp_compute_https_health_check:
google.cloud.gcp_compute_https_health_check:
name: "{{ resource_name }}"
healthy_threshold: 10
port: 8080
@ -74,7 +74,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a HTTPS health check
gcp_compute_https_health_check:
google.cloud.gcp_compute_https_health_check:
name: "{{ resource_name }}"
healthy_threshold: 10
port: 8080
@ -105,7 +105,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a HTTPS health check that does not exist
gcp_compute_https_health_check:
google.cloud.gcp_compute_https_health_check:
name: "{{ resource_name }}"
healthy_threshold: 10
port: 8080

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a disk
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: disk-image
zone: us-central1-a
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: disk
- name: delete a image
gcp_compute_image:
google.cloud.gcp_compute_image:
name: "{{ resource_name }}"
source_disk: "{{ disk }}"
project: "{{ gcp_project }}"
@ -32,7 +32,7 @@
state: absent
#----------------------------------------------------------
- name: create a image
gcp_compute_image:
google.cloud.gcp_compute_image:
name: "{{ resource_name }}"
source_disk: "{{ disk }}"
project: "{{ gcp_project }}"
@ -60,7 +60,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a image that already exists
gcp_compute_image:
google.cloud.gcp_compute_image:
name: "{{ resource_name }}"
source_disk: "{{ disk }}"
project: "{{ gcp_project }}"
@ -74,7 +74,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a image
gcp_compute_image:
google.cloud.gcp_compute_image:
name: "{{ resource_name }}"
source_disk: "{{ disk }}"
project: "{{ gcp_project }}"
@ -102,7 +102,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a image that does not exist
gcp_compute_image:
google.cloud.gcp_compute_image:
name: "{{ resource_name }}"
source_disk: "{{ disk }}"
project: "{{ gcp_project }}"
@ -118,7 +118,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a disk
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: disk-image
zone: us-central1-a
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a disk
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: disk-instance
size_gb: 50
source_image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts
@ -25,7 +25,7 @@
state: present
register: disk
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instance
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -33,7 +33,7 @@
state: present
register: network
- name: create a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-instance
region: us-central1
project: "{{ gcp_project }}"
@ -42,7 +42,7 @@
state: present
register: address
- name: delete a instance
gcp_compute_instance:
google.cloud.gcp_compute_instance:
name: "{{ resource_name }}"
machine_type: n1-standard-1
disks:
@ -67,7 +67,7 @@
state: absent
#----------------------------------------------------------
- name: create a instance
gcp_compute_instance:
google.cloud.gcp_compute_instance:
name: "{{ resource_name }}"
machine_type: n1-standard-1
disks:
@ -112,7 +112,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a instance that already exists
gcp_compute_instance:
google.cloud.gcp_compute_instance:
name: "{{ resource_name }}"
machine_type: n1-standard-1
disks:
@ -142,7 +142,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a instance
gcp_compute_instance:
google.cloud.gcp_compute_instance:
name: "{{ resource_name }}"
machine_type: n1-standard-1
disks:
@ -187,7 +187,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a instance that does not exist
gcp_compute_instance:
google.cloud.gcp_compute_instance:
name: "{{ resource_name }}"
machine_type: n1-standard-1
disks:
@ -219,7 +219,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-instance
region: us-central1
project: "{{ gcp_project }}"
@ -229,7 +229,7 @@
register: address
ignore_errors: true
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instance
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -238,7 +238,7 @@
register: network
ignore_errors: true
- name: delete a disk
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: disk-instance
size_gb: 50
source_image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instancegroup
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: network
- name: delete a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: "{{ resource_name }}"
named_ports:
- name: ansible
@ -35,7 +35,7 @@
state: absent
#----------------------------------------------------------
- name: create a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: "{{ resource_name }}"
named_ports:
- name: ansible
@ -68,7 +68,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a instance group that already exists
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: "{{ resource_name }}"
named_ports:
- name: ansible
@ -86,7 +86,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: "{{ resource_name }}"
named_ports:
- name: ansible
@ -119,7 +119,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a instance group that does not exist
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: "{{ resource_name }}"
named_ports:
- name: ansible
@ -139,7 +139,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instancegroup
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instancetemplate
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: network
- name: create a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-instancetemplate
region: us-west1
project: "{{ gcp_project }}"
@ -31,7 +31,7 @@
state: present
register: address
- name: create a instance template
gcp_compute_instance_template:
google.cloud.gcp_compute_instance_template:
name: "{{ resource_name }}"
properties:
disks:
@ -52,7 +52,7 @@
state: present
register: instancetemplate
- name: delete a instance group manager
gcp_compute_instance_group_manager:
google.cloud.gcp_compute_instance_group_manager:
name: "{{ resource_name }}"
base_instance_name: test1-child
instance_template: "{{ instancetemplate }}"
@ -64,7 +64,7 @@
state: absent
#----------------------------------------------------------
- name: create a instance group manager
gcp_compute_instance_group_manager:
google.cloud.gcp_compute_instance_group_manager:
name: "{{ resource_name }}"
base_instance_name: test1-child
instance_template: "{{ instancetemplate }}"
@ -96,7 +96,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a instance group manager that already exists
gcp_compute_instance_group_manager:
google.cloud.gcp_compute_instance_group_manager:
name: "{{ resource_name }}"
base_instance_name: test1-child
instance_template: "{{ instancetemplate }}"
@ -113,7 +113,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a instance group manager
gcp_compute_instance_group_manager:
google.cloud.gcp_compute_instance_group_manager:
name: "{{ resource_name }}"
base_instance_name: test1-child
instance_template: "{{ instancetemplate }}"
@ -145,7 +145,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a instance group manager that does not exist
gcp_compute_instance_group_manager:
google.cloud.gcp_compute_instance_group_manager:
name: "{{ resource_name }}"
base_instance_name: test1-child
instance_template: "{{ instancetemplate }}"
@ -164,7 +164,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a instance template
gcp_compute_instance_template:
google.cloud.gcp_compute_instance_template:
name: "{{ resource_name }}"
properties:
disks:
@ -186,7 +186,7 @@
register: instancetemplate
ignore_errors: true
- name: delete a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-instancetemplate
region: us-west1
project: "{{ gcp_project }}"
@ -196,7 +196,7 @@
register: address
ignore_errors: true
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instancetemplate
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instancetemplate
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: network
- name: create a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-instancetemplate
region: us-west1
project: "{{ gcp_project }}"
@ -31,7 +31,7 @@
state: present
register: address
- name: delete a instance template
gcp_compute_instance_template:
google.cloud.gcp_compute_instance_template:
name: "{{ resource_name }}"
properties:
disks:
@ -52,7 +52,7 @@
state: absent
#----------------------------------------------------------
- name: create a instance template
gcp_compute_instance_template:
google.cloud.gcp_compute_instance_template:
name: "{{ resource_name }}"
properties:
disks:
@ -92,7 +92,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a instance template that already exists
gcp_compute_instance_template:
google.cloud.gcp_compute_instance_template:
name: "{{ resource_name }}"
properties:
disks:
@ -118,7 +118,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a instance template
gcp_compute_instance_template:
google.cloud.gcp_compute_instance_template:
name: "{{ resource_name }}"
properties:
disks:
@ -158,7 +158,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a instance template that does not exist
gcp_compute_instance_template:
google.cloud.gcp_compute_instance_template:
name: "{{ resource_name }}"
properties:
disks:
@ -186,7 +186,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-instancetemplate
region: us-west1
project: "{{ gcp_project }}"
@ -196,7 +196,7 @@
register: address
ignore_errors: true
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instancetemplate
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: "{{ resource_name }}"
auto_create_subnetworks: 'true'
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: absent
#----------------------------------------------------------
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: "{{ resource_name }}"
auto_create_subnetworks: 'true'
project: "{{ gcp_project }}"
@ -51,7 +51,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a network that already exists
gcp_compute_network:
google.cloud.gcp_compute_network:
name: "{{ resource_name }}"
auto_create_subnetworks: 'true'
project: "{{ gcp_project }}"
@ -65,7 +65,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: "{{ resource_name }}"
auto_create_subnetworks: 'true'
project: "{{ gcp_project }}"
@ -93,7 +93,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a network that does not exist
gcp_compute_network:
google.cloud.gcp_compute_network:
name: "{{ resource_name }}"
auto_create_subnetworks: 'true'
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a node template
gcp_compute_node_template:
google.cloud.gcp_compute_node_template:
name: "{{ resource_name }}"
region: us-central1
node_type: n1-node-96-624
@ -24,7 +24,7 @@
state: absent
#----------------------------------------------------------
- name: create a node template
gcp_compute_node_template:
google.cloud.gcp_compute_node_template:
name: "{{ resource_name }}"
region: us-central1
node_type: n1-node-96-624
@ -54,7 +54,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a node template that already exists
gcp_compute_node_template:
google.cloud.gcp_compute_node_template:
name: "{{ resource_name }}"
region: us-central1
node_type: n1-node-96-624
@ -69,7 +69,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a node template
gcp_compute_node_template:
google.cloud.gcp_compute_node_template:
name: "{{ resource_name }}"
region: us-central1
node_type: n1-node-96-624
@ -99,7 +99,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a node template that does not exist
gcp_compute_node_template:
google.cloud.gcp_compute_node_template:
name: "{{ resource_name }}"
region: us-central1
node_type: n1-node-96-624

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a region disk
gcp_compute_region_disk:
google.cloud.gcp_compute_region_disk:
name: "{{ resource_name }}"
size_gb: 500
disk_encryption_key:
@ -29,7 +29,7 @@
state: absent
#----------------------------------------------------------
- name: create a region disk
gcp_compute_region_disk:
google.cloud.gcp_compute_region_disk:
name: "{{ resource_name }}"
size_gb: 500
disk_encryption_key:
@ -64,7 +64,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a region disk that already exists
gcp_compute_region_disk:
google.cloud.gcp_compute_region_disk:
name: "{{ resource_name }}"
size_gb: 500
disk_encryption_key:
@ -84,7 +84,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a region disk
gcp_compute_region_disk:
google.cloud.gcp_compute_region_disk:
name: "{{ resource_name }}"
size_gb: 500
disk_encryption_key:
@ -119,7 +119,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a region disk that does not exist
gcp_compute_region_disk:
google.cloud.gcp_compute_region_disk:
name: "{{ resource_name }}"
size_gb: 500
disk_encryption_key:

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-route
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: network
- name: delete a route
gcp_compute_route:
google.cloud.gcp_compute_route:
name: "{{ resource_name }}"
dest_range: 192.168.6.0/24
next_hop_gateway: global/gateways/default-internet-gateway
@ -36,7 +36,7 @@
state: absent
#----------------------------------------------------------
- name: create a route
gcp_compute_route:
google.cloud.gcp_compute_route:
name: "{{ resource_name }}"
dest_range: 192.168.6.0/24
next_hop_gateway: global/gateways/default-internet-gateway
@ -69,7 +69,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a route that already exists
gcp_compute_route:
google.cloud.gcp_compute_route:
name: "{{ resource_name }}"
dest_range: 192.168.6.0/24
next_hop_gateway: global/gateways/default-internet-gateway
@ -88,7 +88,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a route
gcp_compute_route:
google.cloud.gcp_compute_route:
name: "{{ resource_name }}"
dest_range: 192.168.6.0/24
next_hop_gateway: global/gateways/default-internet-gateway
@ -121,7 +121,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a route that does not exist
gcp_compute_route:
google.cloud.gcp_compute_route:
name: "{{ resource_name }}"
dest_range: 192.168.6.0/24
next_hop_gateway: global/gateways/default-internet-gateway
@ -142,7 +142,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-route
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-router
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: network
- name: delete a router
gcp_compute_router:
google.cloud.gcp_compute_router:
name: "{{ resource_name }}"
network: "{{ network }}"
bgp:
@ -40,7 +40,7 @@
state: absent
#----------------------------------------------------------
- name: create a router
gcp_compute_router:
google.cloud.gcp_compute_router:
name: "{{ resource_name }}"
network: "{{ network }}"
bgp:
@ -78,7 +78,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a router that already exists
gcp_compute_router:
google.cloud.gcp_compute_router:
name: "{{ resource_name }}"
network: "{{ network }}"
bgp:
@ -101,7 +101,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a router
gcp_compute_router:
google.cloud.gcp_compute_router:
name: "{{ resource_name }}"
network: "{{ network }}"
bgp:
@ -139,7 +139,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a router that does not exist
gcp_compute_router:
google.cloud.gcp_compute_router:
name: "{{ resource_name }}"
network: "{{ network }}"
bgp:
@ -164,7 +164,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-router
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a disk
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: disk-snapshot
zone: us-central1-a
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: disk
- name: delete a snapshot
gcp_compute_snapshot:
google.cloud.gcp_compute_snapshot:
name: "{{ resource_name }}"
source_disk: "{{ disk }}"
zone: us-central1-a
@ -35,7 +35,7 @@
state: absent
#----------------------------------------------------------
- name: create a snapshot
gcp_compute_snapshot:
google.cloud.gcp_compute_snapshot:
name: "{{ resource_name }}"
source_disk: "{{ disk }}"
zone: us-central1-a
@ -66,7 +66,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a snapshot that already exists
gcp_compute_snapshot:
google.cloud.gcp_compute_snapshot:
name: "{{ resource_name }}"
source_disk: "{{ disk }}"
zone: us-central1-a
@ -83,7 +83,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a snapshot
gcp_compute_snapshot:
google.cloud.gcp_compute_snapshot:
name: "{{ resource_name }}"
source_disk: "{{ disk }}"
zone: us-central1-a
@ -114,7 +114,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a snapshot that does not exist
gcp_compute_snapshot:
google.cloud.gcp_compute_snapshot:
name: "{{ resource_name }}"
source_disk: "{{ disk }}"
zone: us-central1-a
@ -133,7 +133,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a disk
gcp_compute_disk:
google.cloud.gcp_compute_disk:
name: disk-snapshot
zone: us-central1-a
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a SSL certificate
gcp_compute_ssl_certificate:
google.cloud.gcp_compute_ssl_certificate:
name: "{{ resource_name }}"
description: A certificate for testing. Do not use this certificate in production
certificate: |-
@ -47,7 +47,7 @@
state: absent
#----------------------------------------------------------
- name: create a SSL certificate
gcp_compute_ssl_certificate:
google.cloud.gcp_compute_ssl_certificate:
name: "{{ resource_name }}"
description: A certificate for testing. Do not use this certificate in production
certificate: |-
@ -99,7 +99,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a SSL certificate that already exists
gcp_compute_ssl_certificate:
google.cloud.gcp_compute_ssl_certificate:
name: "{{ resource_name }}"
description: A certificate for testing. Do not use this certificate in production
certificate: |-
@ -137,7 +137,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a SSL certificate
gcp_compute_ssl_certificate:
google.cloud.gcp_compute_ssl_certificate:
name: "{{ resource_name }}"
description: A certificate for testing. Do not use this certificate in production
certificate: |-
@ -189,7 +189,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a SSL certificate that does not exist
gcp_compute_ssl_certificate:
google.cloud.gcp_compute_ssl_certificate:
name: "{{ resource_name }}"
description: A certificate for testing. Do not use this certificate in production
certificate: |-

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a SSL policy
gcp_compute_ssl_policy:
google.cloud.gcp_compute_ssl_policy:
name: "{{ resource_name }}"
profile: CUSTOM
min_tls_version: TLS_1_2
@ -27,7 +27,7 @@
state: absent
#----------------------------------------------------------
- name: create a SSL policy
gcp_compute_ssl_policy:
google.cloud.gcp_compute_ssl_policy:
name: "{{ resource_name }}"
profile: CUSTOM
min_tls_version: TLS_1_2
@ -59,7 +59,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a SSL policy that already exists
gcp_compute_ssl_policy:
google.cloud.gcp_compute_ssl_policy:
name: "{{ resource_name }}"
profile: CUSTOM
min_tls_version: TLS_1_2
@ -77,7 +77,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a SSL policy
gcp_compute_ssl_policy:
google.cloud.gcp_compute_ssl_policy:
name: "{{ resource_name }}"
profile: CUSTOM
min_tls_version: TLS_1_2
@ -109,7 +109,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a SSL policy that does not exist
gcp_compute_ssl_policy:
google.cloud.gcp_compute_ssl_policy:
name: "{{ resource_name }}"
profile: CUSTOM
min_tls_version: TLS_1_2

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-subnetwork
auto_create_subnetworks: 'true'
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: network
- name: delete a subnetwork
gcp_compute_subnetwork:
google.cloud.gcp_compute_subnetwork:
name: ansiblenet
region: us-west1
network: "{{ network }}"
@ -34,7 +34,7 @@
state: absent
#----------------------------------------------------------
- name: create a subnetwork
gcp_compute_subnetwork:
google.cloud.gcp_compute_subnetwork:
name: ansiblenet
region: us-west1
network: "{{ network }}"
@ -65,7 +65,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a subnetwork that already exists
gcp_compute_subnetwork:
google.cloud.gcp_compute_subnetwork:
name: ansiblenet
region: us-west1
network: "{{ network }}"
@ -81,7 +81,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a subnetwork
gcp_compute_subnetwork:
google.cloud.gcp_compute_subnetwork:
name: ansiblenet
region: us-west1
network: "{{ network }}"
@ -112,7 +112,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a subnetwork that does not exist
gcp_compute_subnetwork:
google.cloud.gcp_compute_subnetwork:
name: ansiblenet
region: us-west1
network: "{{ network }}"
@ -130,7 +130,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-subnetwork
auto_create_subnetworks: 'true'
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-targethttpproxy
zone: us-central1-a
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: instancegroup
- name: create a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-targethttpproxy
healthy_threshold: 10
port: 8080
@ -35,7 +35,7 @@
state: present
register: healthcheck
- name: create a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-targethttpproxy
backends:
- group: "{{ instancegroup.selfLink }}"
@ -48,7 +48,7 @@
state: present
register: backendservice
- name: create a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: urlmap-targethttpproxy
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -57,7 +57,7 @@
state: present
register: urlmap
- name: delete a target HTTP proxy
gcp_compute_target_http_proxy:
google.cloud.gcp_compute_target_http_proxy:
name: "{{ resource_name }}"
url_map: "{{ urlmap }}"
project: "{{ gcp_project }}"
@ -66,7 +66,7 @@
state: absent
#----------------------------------------------------------
- name: create a target HTTP proxy
gcp_compute_target_http_proxy:
google.cloud.gcp_compute_target_http_proxy:
name: "{{ resource_name }}"
url_map: "{{ urlmap }}"
project: "{{ gcp_project }}"
@ -94,7 +94,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a target HTTP proxy that already exists
gcp_compute_target_http_proxy:
google.cloud.gcp_compute_target_http_proxy:
name: "{{ resource_name }}"
url_map: "{{ urlmap }}"
project: "{{ gcp_project }}"
@ -108,7 +108,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a target HTTP proxy
gcp_compute_target_http_proxy:
google.cloud.gcp_compute_target_http_proxy:
name: "{{ resource_name }}"
url_map: "{{ urlmap }}"
project: "{{ gcp_project }}"
@ -136,7 +136,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a target HTTP proxy that does not exist
gcp_compute_target_http_proxy:
google.cloud.gcp_compute_target_http_proxy:
name: "{{ resource_name }}"
url_map: "{{ urlmap }}"
project: "{{ gcp_project }}"
@ -152,7 +152,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: urlmap-targethttpproxy
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -162,7 +162,7 @@
register: urlmap
ignore_errors: true
- name: delete a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-targethttpproxy
backends:
- group: "{{ instancegroup.selfLink }}"
@ -176,7 +176,7 @@
register: backendservice
ignore_errors: true
- name: delete a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-targethttpproxy
healthy_threshold: 10
port: 8080
@ -189,7 +189,7 @@
register: healthcheck
ignore_errors: true
- name: delete a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-targethttpproxy
zone: us-central1-a
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-targethttpsproxy
zone: us-central1-a
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: instancegroup
- name: create a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-targethttpsproxy
healthy_threshold: 10
port: 8080
@ -35,7 +35,7 @@
state: present
register: healthcheck
- name: create a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-targethttpsproxy
backends:
- group: "{{ instancegroup.selfLink }}"
@ -48,7 +48,7 @@
state: present
register: backendservice
- name: create a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: urlmap-targethttpsproxy
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -57,7 +57,7 @@
state: present
register: urlmap
- name: create a SSL certificate
gcp_compute_ssl_certificate:
google.cloud.gcp_compute_ssl_certificate:
name: sslcert-targethttpsproxy
description: A certificate for testing. Do not use this certificate in production
certificate: |-
@ -90,7 +90,7 @@
state: present
register: sslcert
- name: delete a target HTTPS proxy
gcp_compute_target_https_proxy:
google.cloud.gcp_compute_target_https_proxy:
name: "{{ resource_name }}"
ssl_certificates:
- "{{ sslcert }}"
@ -101,7 +101,7 @@
state: absent
#----------------------------------------------------------
- name: create a target HTTPS proxy
gcp_compute_target_https_proxy:
google.cloud.gcp_compute_target_https_proxy:
name: "{{ resource_name }}"
ssl_certificates:
- "{{ sslcert }}"
@ -131,7 +131,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a target HTTPS proxy that already exists
gcp_compute_target_https_proxy:
google.cloud.gcp_compute_target_https_proxy:
name: "{{ resource_name }}"
ssl_certificates:
- "{{ sslcert }}"
@ -147,7 +147,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a target HTTPS proxy
gcp_compute_target_https_proxy:
google.cloud.gcp_compute_target_https_proxy:
name: "{{ resource_name }}"
ssl_certificates:
- "{{ sslcert }}"
@ -177,7 +177,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a target HTTPS proxy that does not exist
gcp_compute_target_https_proxy:
google.cloud.gcp_compute_target_https_proxy:
name: "{{ resource_name }}"
ssl_certificates:
- "{{ sslcert }}"
@ -195,7 +195,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a SSL certificate
gcp_compute_ssl_certificate:
google.cloud.gcp_compute_ssl_certificate:
name: sslcert-targethttpsproxy
description: A certificate for testing. Do not use this certificate in production
certificate: |-
@ -229,7 +229,7 @@
register: sslcert
ignore_errors: true
- name: delete a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: urlmap-targethttpsproxy
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -239,7 +239,7 @@
register: urlmap
ignore_errors: true
- name: delete a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-targethttpsproxy
backends:
- group: "{{ instancegroup.selfLink }}"
@ -253,7 +253,7 @@
register: backendservice
ignore_errors: true
- name: delete a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-targethttpsproxy
healthy_threshold: 10
port: 8080
@ -266,7 +266,7 @@
register: healthcheck
ignore_errors: true
- name: delete a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-targethttpsproxy
zone: us-central1-a
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a target pool
gcp_compute_target_pool:
google.cloud.gcp_compute_target_pool:
name: "{{ resource_name }}"
region: us-west1
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: absent
#----------------------------------------------------------
- name: create a target pool
gcp_compute_target_pool:
google.cloud.gcp_compute_target_pool:
name: "{{ resource_name }}"
region: us-west1
project: "{{ gcp_project }}"
@ -52,7 +52,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a target pool that already exists
gcp_compute_target_pool:
google.cloud.gcp_compute_target_pool:
name: "{{ resource_name }}"
region: us-west1
project: "{{ gcp_project }}"
@ -66,7 +66,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a target pool
gcp_compute_target_pool:
google.cloud.gcp_compute_target_pool:
name: "{{ resource_name }}"
region: us-west1
project: "{{ gcp_project }}"
@ -95,7 +95,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a target pool that does not exist
gcp_compute_target_pool:
google.cloud.gcp_compute_target_pool:
name: "{{ resource_name }}"
region: us-west1
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-targetsslproxy
zone: us-central1-a
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: instancegroup
- name: create a health check
gcp_compute_health_check:
google.cloud.gcp_compute_health_check:
name: healthcheck-targetsslproxy
type: TCP
tcp_health_check:
@ -39,7 +39,7 @@
state: present
register: healthcheck
- name: create a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-targetsslproxy
backends:
- group: "{{ instancegroup.selfLink }}"
@ -52,7 +52,7 @@
state: present
register: backendservice
- name: create a SSL certificate
gcp_compute_ssl_certificate:
google.cloud.gcp_compute_ssl_certificate:
name: sslcert-targetsslproxy
description: A certificate for testing. Do not use this certificate in production
certificate: |-
@ -85,7 +85,7 @@
state: present
register: sslcert
- name: delete a target SSL proxy
gcp_compute_target_ssl_proxy:
google.cloud.gcp_compute_target_ssl_proxy:
name: "{{ resource_name }}"
ssl_certificates:
- "{{ sslcert }}"
@ -96,7 +96,7 @@
state: absent
#----------------------------------------------------------
- name: create a target SSL proxy
gcp_compute_target_ssl_proxy:
google.cloud.gcp_compute_target_ssl_proxy:
name: "{{ resource_name }}"
ssl_certificates:
- "{{ sslcert }}"
@ -126,7 +126,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a target SSL proxy that already exists
gcp_compute_target_ssl_proxy:
google.cloud.gcp_compute_target_ssl_proxy:
name: "{{ resource_name }}"
ssl_certificates:
- "{{ sslcert }}"
@ -142,7 +142,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a target SSL proxy
gcp_compute_target_ssl_proxy:
google.cloud.gcp_compute_target_ssl_proxy:
name: "{{ resource_name }}"
ssl_certificates:
- "{{ sslcert }}"
@ -172,7 +172,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a target SSL proxy that does not exist
gcp_compute_target_ssl_proxy:
google.cloud.gcp_compute_target_ssl_proxy:
name: "{{ resource_name }}"
ssl_certificates:
- "{{ sslcert }}"
@ -190,7 +190,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a SSL certificate
gcp_compute_ssl_certificate:
google.cloud.gcp_compute_ssl_certificate:
name: sslcert-targetsslproxy
description: A certificate for testing. Do not use this certificate in production
certificate: |-
@ -224,7 +224,7 @@
register: sslcert
ignore_errors: true
- name: delete a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-targetsslproxy
backends:
- group: "{{ instancegroup.selfLink }}"
@ -238,7 +238,7 @@
register: backendservice
ignore_errors: true
- name: delete a health check
gcp_compute_health_check:
google.cloud.gcp_compute_health_check:
name: healthcheck-targetsslproxy
type: TCP
tcp_health_check:
@ -255,7 +255,7 @@
register: healthcheck
ignore_errors: true
- name: delete a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-targetsslproxy
zone: us-central1-a
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-targettcpproxy
zone: us-central1-a
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: instancegroup
- name: create a health check
gcp_compute_health_check:
google.cloud.gcp_compute_health_check:
name: healthcheck-targettcpproxy
type: TCP
tcp_health_check:
@ -39,7 +39,7 @@
state: present
register: healthcheck
- name: create a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-targettcpproxy
backends:
- group: "{{ instancegroup.selfLink }}"
@ -52,7 +52,7 @@
state: present
register: backendservice
- name: delete a target TCP proxy
gcp_compute_target_tcp_proxy:
google.cloud.gcp_compute_target_tcp_proxy:
name: "{{ resource_name }}"
proxy_header: PROXY_V1
service: "{{ backendservice }}"
@ -62,7 +62,7 @@
state: absent
#----------------------------------------------------------
- name: create a target TCP proxy
gcp_compute_target_tcp_proxy:
google.cloud.gcp_compute_target_tcp_proxy:
name: "{{ resource_name }}"
proxy_header: PROXY_V1
service: "{{ backendservice }}"
@ -91,7 +91,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a target TCP proxy that already exists
gcp_compute_target_tcp_proxy:
google.cloud.gcp_compute_target_tcp_proxy:
name: "{{ resource_name }}"
proxy_header: PROXY_V1
service: "{{ backendservice }}"
@ -106,7 +106,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a target TCP proxy
gcp_compute_target_tcp_proxy:
google.cloud.gcp_compute_target_tcp_proxy:
name: "{{ resource_name }}"
proxy_header: PROXY_V1
service: "{{ backendservice }}"
@ -135,7 +135,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a target TCP proxy that does not exist
gcp_compute_target_tcp_proxy:
google.cloud.gcp_compute_target_tcp_proxy:
name: "{{ resource_name }}"
proxy_header: PROXY_V1
service: "{{ backendservice }}"
@ -152,7 +152,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-targettcpproxy
backends:
- group: "{{ instancegroup.selfLink }}"
@ -166,7 +166,7 @@
register: backendservice
ignore_errors: true
- name: delete a health check
gcp_compute_health_check:
google.cloud.gcp_compute_health_check:
name: healthcheck-targettcpproxy
type: TCP
tcp_health_check:
@ -183,7 +183,7 @@
register: healthcheck
ignore_errors: true
- name: delete a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-targettcpproxy
zone: us-central1-a
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-vpngateway
region: us-west1
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: address
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-vpngateway
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -31,7 +31,7 @@
state: present
register: network
- name: delete a target vpn gateway
gcp_compute_target_vpn_gateway:
google.cloud.gcp_compute_target_vpn_gateway:
name: "{{ resource_name }}"
region: us-west1
network: "{{ network }}"
@ -41,7 +41,7 @@
state: absent
#----------------------------------------------------------
- name: create a target vpn gateway
gcp_compute_target_vpn_gateway:
google.cloud.gcp_compute_target_vpn_gateway:
name: "{{ resource_name }}"
region: us-west1
network: "{{ network }}"
@ -71,7 +71,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a target vpn gateway that already exists
gcp_compute_target_vpn_gateway:
google.cloud.gcp_compute_target_vpn_gateway:
name: "{{ resource_name }}"
region: us-west1
network: "{{ network }}"
@ -86,7 +86,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a target vpn gateway
gcp_compute_target_vpn_gateway:
google.cloud.gcp_compute_target_vpn_gateway:
name: "{{ resource_name }}"
region: us-west1
network: "{{ network }}"
@ -116,7 +116,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a target vpn gateway that does not exist
gcp_compute_target_vpn_gateway:
google.cloud.gcp_compute_target_vpn_gateway:
name: "{{ resource_name }}"
region: us-west1
network: "{{ network }}"
@ -133,7 +133,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-vpngateway
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -142,7 +142,7 @@
register: network
ignore_errors: true
- name: delete a address
gcp_compute_address:
google.cloud.gcp_compute_address:
name: address-vpngateway
region: us-west1
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-urlmap
zone: us-central1-a
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: present
register: instancegroup
- name: create a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-urlmap
healthy_threshold: 10
port: 8080
@ -35,7 +35,7 @@
state: present
register: healthcheck
- name: create a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-urlmap
backends:
- group: "{{ instancegroup.selfLink }}"
@ -48,7 +48,7 @@
state: present
register: backendservice
- name: delete a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: "{{ resource_name }}"
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -57,7 +57,7 @@
state: absent
#----------------------------------------------------------
- name: create a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: "{{ resource_name }}"
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -85,7 +85,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a URL map that already exists
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: "{{ resource_name }}"
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -99,7 +99,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: "{{ resource_name }}"
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -127,7 +127,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a URL map that does not exist
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: "{{ resource_name }}"
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -143,7 +143,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-urlmap
backends:
- group: "{{ instancegroup.selfLink }}"
@ -157,7 +157,7 @@
register: backendservice
ignore_errors: true
- name: delete a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-urlmap
healthy_threshold: 10
port: 8080
@ -170,7 +170,7 @@
register: healthcheck
ignore_errors: true
- name: delete a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-urlmap
zone: us-central1-a
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-vpn-tunnel
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: network
- name: create a router
gcp_compute_router:
google.cloud.gcp_compute_router:
name: router-vpn-tunnel
network: "{{ network }}"
bgp:
@ -40,7 +40,7 @@
state: present
register: router
- name: create a target vpn gateway
gcp_compute_target_vpn_gateway:
google.cloud.gcp_compute_target_vpn_gateway:
name: gateway-vpn-tunnel
region: us-west1
network: "{{ network }}"
@ -50,7 +50,7 @@
state: present
register: gateway
- name: delete a vpn tunnel
gcp_compute_vpn_tunnel:
google.cloud.gcp_compute_vpn_tunnel:
name: "{{ resource_name }}"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
@ -62,7 +62,7 @@
state: absent
#----------------------------------------------------------
- name: create a vpn tunnel
gcp_compute_vpn_tunnel:
google.cloud.gcp_compute_vpn_tunnel:
name: "{{ resource_name }}"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
@ -94,7 +94,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a vpn tunnel that already exists
gcp_compute_vpn_tunnel:
google.cloud.gcp_compute_vpn_tunnel:
name: "{{ resource_name }}"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
@ -111,7 +111,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a vpn tunnel
gcp_compute_vpn_tunnel:
google.cloud.gcp_compute_vpn_tunnel:
name: "{{ resource_name }}"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
@ -143,7 +143,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a vpn tunnel that does not exist
gcp_compute_vpn_tunnel:
google.cloud.gcp_compute_vpn_tunnel:
name: "{{ resource_name }}"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
@ -162,7 +162,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a target vpn gateway
gcp_compute_target_vpn_gateway:
google.cloud.gcp_compute_target_vpn_gateway:
name: gateway-vpn-tunnel
region: us-west1
network: "{{ network }}"
@ -173,7 +173,7 @@
register: gateway
ignore_errors: true
- name: delete a router
gcp_compute_router:
google.cloud.gcp_compute_router:
name: router-vpn-tunnel
network: "{{ network }}"
bgp:
@ -192,7 +192,7 @@
register: router
ignore_errors: true
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-vpn-tunnel
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a cluster
gcp_container_cluster:
google.cloud.gcp_container_cluster:
name: my-cluster
initial_node_count: 2
master_auth:
@ -30,7 +30,7 @@
state: absent
#----------------------------------------------------------
- name: create a cluster
gcp_container_cluster:
google.cloud.gcp_container_cluster:
name: my-cluster
initial_node_count: 2
master_auth:
@ -64,7 +64,7 @@
- "'my-cluster' in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: create a cluster that already exists
gcp_container_cluster:
google.cloud.gcp_container_cluster:
name: my-cluster
initial_node_count: 2
master_auth:
@ -85,7 +85,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a cluster
gcp_container_cluster:
google.cloud.gcp_container_cluster:
name: my-cluster
initial_node_count: 2
master_auth:
@ -119,7 +119,7 @@
- "'my-cluster' not in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: delete a cluster that does not exist
gcp_container_cluster:
google.cloud.gcp_container_cluster:
name: my-cluster
initial_node_count: 2
master_auth:

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a cluster
gcp_container_cluster:
google.cloud.gcp_container_cluster:
name: cluster-nodepool
initial_node_count: 4
location: us-central1-a
@ -24,7 +24,7 @@
state: present
register: cluster
- name: delete a node pool
gcp_container_node_pool:
google.cloud.gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
@ -35,7 +35,7 @@
state: absent
#----------------------------------------------------------
- name: create a node pool
gcp_container_node_pool:
google.cloud.gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
@ -65,7 +65,7 @@
- "'my-pool' in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: create a node pool that already exists
gcp_container_node_pool:
google.cloud.gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
@ -81,7 +81,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a node pool
gcp_container_node_pool:
google.cloud.gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
@ -111,7 +111,7 @@
- "'my-pool' not in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: delete a node pool that does not exist
gcp_container_node_pool:
google.cloud.gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
@ -129,7 +129,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a cluster
gcp_container_cluster:
google.cloud.gcp_container_cluster:
name: cluster-nodepool
initial_node_count: 4
location: us-central1-a

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a managed zone
gcp_dns_managed_zone:
google.cloud.gcp_dns_managed_zone:
name: "{{ resource_name }}"
dns_name: test.somewild2.example.com.
description: test zone
@ -24,7 +24,7 @@
state: absent
#----------------------------------------------------------
- name: create a managed zone
gcp_dns_managed_zone:
google.cloud.gcp_dns_managed_zone:
name: "{{ resource_name }}"
dns_name: test.somewild2.example.com.
description: test zone
@ -52,7 +52,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a managed zone that already exists
gcp_dns_managed_zone:
google.cloud.gcp_dns_managed_zone:
name: "{{ resource_name }}"
dns_name: test.somewild2.example.com.
description: test zone
@ -67,7 +67,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a managed zone
gcp_dns_managed_zone:
google.cloud.gcp_dns_managed_zone:
name: "{{ resource_name }}"
dns_name: test.somewild2.example.com.
description: test zone
@ -95,7 +95,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a managed zone that does not exist
gcp_dns_managed_zone:
google.cloud.gcp_dns_managed_zone:
name: "{{ resource_name }}"
dns_name: test.somewild2.example.com.
description: test zone

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a managed zone
gcp_dns_managed_zone:
google.cloud.gcp_dns_managed_zone:
name: managedzone-rrs
dns_name: testzone-4.com.
description: test zone
@ -24,7 +24,7 @@
state: present
register: managed_zone
- name: delete a resource record set
gcp_dns_resource_record_set:
google.cloud.gcp_dns_resource_record_set:
name: www.testzone-4.com.
managed_zone: "{{ managed_zone }}"
type: A
@ -38,7 +38,7 @@
state: absent
#----------------------------------------------------------
- name: create a resource record set
gcp_dns_resource_record_set:
google.cloud.gcp_dns_resource_record_set:
name: www.testzone-4.com.
managed_zone: "{{ managed_zone }}"
type: A
@ -70,7 +70,7 @@
- "'www.testzone-4.com.'in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: create a resource record set that already exists
gcp_dns_resource_record_set:
google.cloud.gcp_dns_resource_record_set:
name: www.testzone-4.com.
managed_zone: "{{ managed_zone }}"
type: A
@ -89,7 +89,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a resource record set
gcp_dns_resource_record_set:
google.cloud.gcp_dns_resource_record_set:
name: www.testzone-4.com.
managed_zone: "{{ managed_zone }}"
type: A
@ -121,7 +121,7 @@
- "'www.testzone-4.com.'not in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: delete a resource record set that does not exist
gcp_dns_resource_record_set:
google.cloud.gcp_dns_resource_record_set:
name: www.testzone-4.com.
managed_zone: "{{ managed_zone }}"
type: A
@ -142,7 +142,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a managed zone
gcp_dns_managed_zone:
google.cloud.gcp_dns_managed_zone:
name: managedzone-rrs
dns_name: testzone-4.com.
description: test zone

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a instance
gcp_filestore_instance:
google.cloud.gcp_filestore_instance:
name: "{{ resource_name }}"
zone: us-central1-b
tier: PREMIUM
@ -31,7 +31,7 @@
state: absent
#----------------------------------------------------------
- name: create a instance
gcp_filestore_instance:
google.cloud.gcp_filestore_instance:
name: "{{ resource_name }}"
zone: us-central1-b
tier: PREMIUM
@ -66,7 +66,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a instance that already exists
gcp_filestore_instance:
google.cloud.gcp_filestore_instance:
name: "{{ resource_name }}"
zone: us-central1-b
tier: PREMIUM
@ -88,7 +88,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a instance
gcp_filestore_instance:
google.cloud.gcp_filestore_instance:
name: "{{ resource_name }}"
zone: us-central1-b
tier: PREMIUM
@ -123,7 +123,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a instance that does not exist
gcp_filestore_instance:
google.cloud.gcp_filestore_instance:
name: "{{ resource_name }}"
zone: us-central1-b
tier: PREMIUM

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a role
gcp_iam_role:
google.cloud.gcp_iam_role:
name: myCustomRole2
title: My Custom Role
description: My custom role description
@ -28,7 +28,7 @@
state: absent
#----------------------------------------------------------
- name: create a role
gcp_iam_role:
google.cloud.gcp_iam_role:
name: myCustomRole2
title: My Custom Role
description: My custom role description
@ -59,7 +59,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*myCustomRole2.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a role that already exists
gcp_iam_role:
google.cloud.gcp_iam_role:
name: myCustomRole2
title: My Custom Role
description: My custom role description
@ -78,7 +78,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a role
gcp_iam_role:
google.cloud.gcp_iam_role:
name: myCustomRole2
title: My Custom Role
description: My custom role description
@ -109,7 +109,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*myCustomRole2.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a role that does not exist
gcp_iam_role:
google.cloud.gcp_iam_role:
name: myCustomRole2
title: My Custom Role
description: My custom role description

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a service account
gcp_iam_service_account:
google.cloud.gcp_iam_service_account:
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
display_name: My Ansible test key
project: "{{ gcp_project }}"
@ -23,7 +23,7 @@
state: absent
#----------------------------------------------------------
- name: create a service account
gcp_iam_service_account:
google.cloud.gcp_iam_service_account:
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
display_name: My Ansible test key
project: "{{ gcp_project }}"
@ -49,7 +49,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a service account that already exists
gcp_iam_service_account:
google.cloud.gcp_iam_service_account:
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
display_name: My Ansible test key
project: "{{ gcp_project }}"
@ -63,7 +63,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a service account
gcp_iam_service_account:
google.cloud.gcp_iam_service_account:
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
display_name: My Ansible test key
project: "{{ gcp_project }}"
@ -89,7 +89,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a service account that does not exist
gcp_iam_service_account:
google.cloud.gcp_iam_service_account:
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
display_name: My Ansible test key
project: "{{ gcp_project }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a model
gcp_mlengine_model:
google.cloud.gcp_mlengine_model:
name: "{{ resource_name | replace('-', '_') }}"
description: My model
regions:
@ -25,7 +25,7 @@
state: absent
#----------------------------------------------------------
- name: create a model
gcp_mlengine_model:
google.cloud.gcp_mlengine_model:
name: "{{ resource_name | replace('-', '_') }}"
description: My model
regions:
@ -53,7 +53,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name | replace('-', '_') }}.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a model that already exists
gcp_mlengine_model:
google.cloud.gcp_mlengine_model:
name: "{{ resource_name | replace('-', '_') }}"
description: My model
regions:
@ -69,7 +69,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a model
gcp_mlengine_model:
google.cloud.gcp_mlengine_model:
name: "{{ resource_name | replace('-', '_') }}"
description: My model
regions:
@ -97,7 +97,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name | replace('-', '_') }}.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a model that does not exist
gcp_mlengine_model:
google.cloud.gcp_mlengine_model:
name: "{{ resource_name | replace('-', '_') }}"
description: My model
regions:

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a model
gcp_mlengine_model:
google.cloud.gcp_mlengine_model:
name: model_version
description: My model
regions:
@ -27,7 +27,7 @@
state: present
register: model
- name: delete a version
gcp_mlengine_version:
google.cloud.gcp_mlengine_version:
name: "{{ resource_name | replace('-', '_') }}"
model: "{{ model }}"
runtime_version: 1.13
@ -40,7 +40,7 @@
state: absent
#----------------------------------------------------------
- name: create a version
gcp_mlengine_version:
google.cloud.gcp_mlengine_version:
name: "{{ resource_name | replace('-', '_') }}"
model: "{{ model }}"
runtime_version: 1.13
@ -71,7 +71,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name | replace('-', '_') }}.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a version that already exists
gcp_mlengine_version:
google.cloud.gcp_mlengine_version:
name: "{{ resource_name | replace('-', '_') }}"
model: "{{ model }}"
runtime_version: 1.13
@ -89,7 +89,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a version
gcp_mlengine_version:
google.cloud.gcp_mlengine_version:
name: "{{ resource_name | replace('-', '_') }}"
model: "{{ model }}"
runtime_version: 1.13
@ -120,7 +120,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name | replace('-', '_') }}.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a version that does not exist
gcp_mlengine_version:
google.cloud.gcp_mlengine_version:
name: "{{ resource_name | replace('-', '_') }}"
model: "{{ model }}"
runtime_version: 1.13
@ -140,7 +140,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a model
gcp_mlengine_model:
google.cloud.gcp_mlengine_model:
name: model_version
description: My model
regions:

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a topic
gcp_pubsub_topic:
google.cloud.gcp_pubsub_topic:
name: topic-subscription
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: topic
- name: delete a subscription
gcp_pubsub_subscription:
google.cloud.gcp_pubsub_subscription:
name: "{{ resource_name }}"
topic: "{{ topic }}"
ack_deadline_seconds: 300
@ -32,7 +32,7 @@
state: absent
#----------------------------------------------------------
- name: create a subscription
gcp_pubsub_subscription:
google.cloud.gcp_pubsub_subscription:
name: "{{ resource_name }}"
topic: "{{ topic }}"
ack_deadline_seconds: 300
@ -59,7 +59,7 @@
- "\"{{resource_name}}\" in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: create a subscription that already exists
gcp_pubsub_subscription:
google.cloud.gcp_pubsub_subscription:
name: "{{ resource_name }}"
topic: "{{ topic }}"
ack_deadline_seconds: 300
@ -74,7 +74,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a subscription
gcp_pubsub_subscription:
google.cloud.gcp_pubsub_subscription:
name: "{{ resource_name }}"
topic: "{{ topic }}"
ack_deadline_seconds: 300
@ -101,7 +101,7 @@
- "\"{{resource_name}}\" not in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: delete a subscription that does not exist
gcp_pubsub_subscription:
google.cloud.gcp_pubsub_subscription:
name: "{{ resource_name }}"
topic: "{{ topic }}"
ack_deadline_seconds: 300
@ -118,7 +118,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a topic
gcp_pubsub_topic:
google.cloud.gcp_pubsub_topic:
name: topic-subscription
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a topic
gcp_pubsub_topic:
google.cloud.gcp_pubsub_topic:
name: test-topic1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: absent
#----------------------------------------------------------
- name: create a topic
gcp_pubsub_topic:
google.cloud.gcp_pubsub_topic:
name: test-topic1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -47,7 +47,7 @@
- "'test-topic1' in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: create a topic that already exists
gcp_pubsub_topic:
google.cloud.gcp_pubsub_topic:
name: test-topic1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -60,7 +60,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a topic
gcp_pubsub_topic:
google.cloud.gcp_pubsub_topic:
name: test-topic1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -85,7 +85,7 @@
- "'test-topic1' not in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: delete a topic that does not exist
gcp_pubsub_topic:
google.cloud.gcp_pubsub_topic:
name: test-topic1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instance
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: network
- name: delete a instance
gcp_redis_instance:
google.cloud.gcp_redis_instance:
name: instance37
tier: STANDARD_HA
memory_size_gb: 1
@ -40,7 +40,7 @@
state: absent
#----------------------------------------------------------
- name: create a instance
gcp_redis_instance:
google.cloud.gcp_redis_instance:
name: instance37
tier: STANDARD_HA
memory_size_gb: 1
@ -76,7 +76,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*instance37.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a instance that already exists
gcp_redis_instance:
google.cloud.gcp_redis_instance:
name: instance37
tier: STANDARD_HA
memory_size_gb: 1
@ -99,7 +99,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a instance
gcp_redis_instance:
google.cloud.gcp_redis_instance:
name: instance37
tier: STANDARD_HA
memory_size_gb: 1
@ -135,7 +135,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*instance37.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a instance that does not exist
gcp_redis_instance:
google.cloud.gcp_redis_instance:
name: instance37
tier: STANDARD_HA
memory_size_gb: 1
@ -160,7 +160,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a network
gcp_compute_network:
google.cloud.gcp_compute_network:
name: network-instance
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a project
gcp_resourcemanager_project:
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
auth_kind: "{{ gcp_cred_kind }}"
@ -25,7 +25,7 @@
state: absent
#----------------------------------------------------------
- name: create a project
gcp_resourcemanager_project:
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
auth_kind: "{{ gcp_cred_kind }}"
@ -53,7 +53,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*My Sample Project.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a project that already exists
gcp_resourcemanager_project:
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
auth_kind: "{{ gcp_cred_kind }}"
@ -69,7 +69,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a project
gcp_resourcemanager_project:
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
auth_kind: "{{ gcp_cred_kind }}"
@ -97,7 +97,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*My Sample Project.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a project that does not exist
gcp_resourcemanager_project:
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a repository
gcp_sourcerepo_repository:
google.cloud.gcp_sourcerepo_repository:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: absent
#----------------------------------------------------------
- name: create a repository
gcp_sourcerepo_repository:
google.cloud.gcp_sourcerepo_repository:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -47,7 +47,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a repository that already exists
gcp_sourcerepo_repository:
google.cloud.gcp_sourcerepo_repository:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -60,7 +60,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a repository
gcp_sourcerepo_repository:
google.cloud.gcp_sourcerepo_repository:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -85,7 +85,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a repository that does not exist
gcp_sourcerepo_repository:
google.cloud.gcp_sourcerepo_repository:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a instance
gcp_spanner_instance:
google.cloud.gcp_spanner_instance:
name: instance-database
display_name: My Spanner Instance
node_count: 2
@ -27,7 +27,7 @@
state: present
register: instance
- name: delete a database
gcp_spanner_database:
google.cloud.gcp_spanner_database:
name: webstore
instance: "{{ instance }}"
project: "{{ gcp_project }}"
@ -36,7 +36,7 @@
state: absent
#----------------------------------------------------------
- name: create a database
gcp_spanner_database:
google.cloud.gcp_spanner_database:
name: webstore
instance: "{{ instance }}"
project: "{{ gcp_project }}"
@ -63,7 +63,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*webstore.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a database that already exists
gcp_spanner_database:
google.cloud.gcp_spanner_database:
name: webstore
instance: "{{ instance }}"
project: "{{ gcp_project }}"
@ -77,7 +77,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a database
gcp_spanner_database:
google.cloud.gcp_spanner_database:
name: webstore
instance: "{{ instance }}"
project: "{{ gcp_project }}"
@ -104,7 +104,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*webstore.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a database that does not exist
gcp_spanner_database:
google.cloud.gcp_spanner_database:
name: webstore
instance: "{{ instance }}"
project: "{{ gcp_project }}"
@ -120,7 +120,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a instance
gcp_spanner_instance:
google.cloud.gcp_spanner_instance:
name: instance-database
display_name: My Spanner Instance
node_count: 2

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a instance
gcp_spanner_instance:
google.cloud.gcp_spanner_instance:
name: testinstance
display_name: My Spanner Instance
node_count: 2
@ -27,7 +27,7 @@
state: absent
#----------------------------------------------------------
- name: create a instance
gcp_spanner_instance:
google.cloud.gcp_spanner_instance:
name: testinstance
display_name: My Spanner Instance
node_count: 2
@ -57,7 +57,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*testinstance.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a instance that already exists
gcp_spanner_instance:
google.cloud.gcp_spanner_instance:
name: testinstance
display_name: My Spanner Instance
node_count: 2
@ -75,7 +75,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a instance
gcp_spanner_instance:
google.cloud.gcp_spanner_instance:
name: testinstance
display_name: My Spanner Instance
node_count: 2
@ -105,7 +105,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*testinstance.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a instance that does not exist
gcp_spanner_instance:
google.cloud.gcp_spanner_instance:
name: testinstance
display_name: My Spanner Instance
node_count: 2

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a instance
gcp_sql_instance:
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-3"
settings:
ip_configuration:
@ -29,7 +29,7 @@
state: present
register: instance
- name: delete a database
gcp_sql_database:
google.cloud.gcp_sql_database:
name: "{{ resource_name }}"
charset: utf8
instance: "{{ instance.name }}"
@ -39,7 +39,7 @@
state: absent
#----------------------------------------------------------
- name: create a database
gcp_sql_database:
google.cloud.gcp_sql_database:
name: "{{ resource_name }}"
charset: utf8
instance: "{{ instance.name }}"
@ -67,7 +67,7 @@
- "\"{{resource_name}}\" in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: create a database that already exists
gcp_sql_database:
google.cloud.gcp_sql_database:
name: "{{ resource_name }}"
charset: utf8
instance: "{{ instance.name }}"
@ -82,7 +82,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a database
gcp_sql_database:
google.cloud.gcp_sql_database:
name: "{{ resource_name }}"
charset: utf8
instance: "{{ instance.name }}"
@ -110,7 +110,7 @@
- "\"{{resource_name}}\" not in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: delete a database that does not exist
gcp_sql_database:
google.cloud.gcp_sql_database:
name: "{{ resource_name }}"
charset: utf8
instance: "{{ instance.name }}"
@ -127,7 +127,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a instance
gcp_sql_instance:
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-3"
settings:
ip_configuration:

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a instance
gcp_sql_instance:
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-2"
settings:
ip_configuration:
@ -29,7 +29,7 @@
state: absent
#----------------------------------------------------------
- name: create a instance
gcp_sql_instance:
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-2"
settings:
ip_configuration:
@ -61,7 +61,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{resource_name}}-2.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a instance that already exists
gcp_sql_instance:
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-2"
settings:
ip_configuration:
@ -81,7 +81,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a instance
gcp_sql_instance:
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-2"
settings:
ip_configuration:
@ -113,7 +113,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{resource_name}}-2.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a instance that does not exist
gcp_sql_instance:
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-2"
settings:
ip_configuration:

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a instance
gcp_sql_instance:
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-1"
settings:
ip_configuration:
@ -29,7 +29,7 @@
state: present
register: instance
- name: delete a user
gcp_sql_user:
google.cloud.gcp_sql_user:
name: test-user
host: 10.1.2.3
password: secret-password
@ -40,7 +40,7 @@
state: absent
#----------------------------------------------------------
- name: create a user
gcp_sql_user:
google.cloud.gcp_sql_user:
name: test-user
host: 10.1.2.3
password: secret-password
@ -69,7 +69,7 @@
- "'test-user' in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: create a user that already exists
gcp_sql_user:
google.cloud.gcp_sql_user:
name: test-user
host: 10.1.2.3
password: secret-password
@ -85,7 +85,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a user
gcp_sql_user:
google.cloud.gcp_sql_user:
name: test-user
host: 10.1.2.3
password: secret-password
@ -114,7 +114,7 @@
- "'test-user' not in \"{{ results['resources'] | map(attribute='name') | list }}\""
# ----------------------------------------------------------------------------
- name: delete a user that does not exist
gcp_sql_user:
google.cloud.gcp_sql_user:
name: test-user
host: 10.1.2.3
password: secret-password
@ -132,7 +132,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a instance
gcp_sql_instance:
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-1"
settings:
ip_configuration:

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a bucket
gcp_storage_bucket:
google.cloud.gcp_storage_bucket:
name: ansible-storage-module
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: absent
#----------------------------------------------------------
- name: create a bucket
gcp_storage_bucket:
google.cloud.gcp_storage_bucket:
name: ansible-storage-module
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -35,7 +35,7 @@
- result.changed == true
# ----------------------------------------------------------------------------
- name: create a bucket that already exists
gcp_storage_bucket:
google.cloud.gcp_storage_bucket:
name: ansible-storage-module
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -48,7 +48,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a bucket
gcp_storage_bucket:
google.cloud.gcp_storage_bucket:
name: ansible-storage-module
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -61,7 +61,7 @@
- result.changed == true
# ----------------------------------------------------------------------------
- name: delete a bucket that does not exist
gcp_storage_bucket:
google.cloud.gcp_storage_bucket:
name: ansible-storage-module
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a bucket
gcp_storage_bucket:
google.cloud.gcp_storage_bucket:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: bucket
- name: delete a bucket access control
gcp_storage_bucket_access_control:
google.cloud.gcp_storage_bucket_access_control:
bucket: "{{ bucket }}"
entity: user-alexstephen@google.com
role: WRITER
@ -32,7 +32,7 @@
state: absent
#----------------------------------------------------------
- name: create a bucket access control
gcp_storage_bucket_access_control:
google.cloud.gcp_storage_bucket_access_control:
bucket: "{{ bucket }}"
entity: user-alexstephen@google.com
role: WRITER
@ -47,7 +47,7 @@
- result.changed == true
# ----------------------------------------------------------------------------
- name: create a bucket access control that already exists
gcp_storage_bucket_access_control:
google.cloud.gcp_storage_bucket_access_control:
bucket: "{{ bucket }}"
entity: user-alexstephen@google.com
role: WRITER
@ -62,7 +62,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a bucket access control
gcp_storage_bucket_access_control:
google.cloud.gcp_storage_bucket_access_control:
bucket: "{{ bucket }}"
entity: user-alexstephen@google.com
role: WRITER
@ -77,7 +77,7 @@
- result.changed == true
# ----------------------------------------------------------------------------
- name: delete a bucket access control that does not exist
gcp_storage_bucket_access_control:
google.cloud.gcp_storage_bucket_access_control:
bucket: "{{ bucket }}"
entity: user-alexstephen@google.com
role: WRITER
@ -94,7 +94,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a bucket
gcp_storage_bucket:
google.cloud.gcp_storage_bucket:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a node
gcp_tpu_node:
google.cloud.gcp_tpu_node:
name: "{{ resource_name }}"
zone: us-central1-b
accelerator_type: v3-8
@ -26,7 +26,7 @@
state: absent
#----------------------------------------------------------
- name: create a node
gcp_tpu_node:
google.cloud.gcp_tpu_node:
name: "{{ resource_name }}"
zone: us-central1-b
accelerator_type: v3-8
@ -56,7 +56,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a node that already exists
gcp_tpu_node:
google.cloud.gcp_tpu_node:
name: "{{ resource_name }}"
zone: us-central1-b
accelerator_type: v3-8
@ -73,7 +73,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a node
gcp_tpu_node:
google.cloud.gcp_tpu_node:
name: "{{ resource_name }}"
zone: us-central1-b
accelerator_type: v3-8
@ -103,7 +103,7 @@
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a node that does not exist
gcp_tpu_node:
google.cloud.gcp_tpu_node:
name: "{{ resource_name }}"
zone: us-central1-b
accelerator_type: v3-8