From 7cd653e50dcd66baf4d74e594caccbbc1b16c58c Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Sat, 8 Oct 2022 18:18:42 +0000 Subject: [PATCH] minor improvement in gcp_compute_instance The test does not yet pass due to a discovered change, but some progress was made. - updating disk image to an existing, non-EOL image. - updating subnetwork configuration. --- .../targets/gcp_compute_instance/aliases | 2 +- .../gcp_compute_instance/tasks/autogen.yml | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/tests/integration/targets/gcp_compute_instance/aliases b/tests/integration/targets/gcp_compute_instance/aliases index 9812f01..ff7eb2d 100644 --- a/tests/integration/targets/gcp_compute_instance/aliases +++ b/tests/integration/targets/gcp_compute_instance/aliases @@ -1,2 +1,2 @@ cloud/gcp -unsupported +unsupported \ No newline at end of file diff --git a/tests/integration/targets/gcp_compute_instance/tasks/autogen.yml b/tests/integration/targets/gcp_compute_instance/tasks/autogen.yml index fb88569..f96d489 100644 --- a/tests/integration/targets/gcp_compute_instance/tasks/autogen.yml +++ b/tests/integration/targets/gcp_compute_instance/tasks/autogen.yml @@ -15,9 +15,9 @@ # Pre-test setup - name: create a disk google.cloud.gcp_compute_disk: - name: disk-instance + name: "{{ resource_prefix }}" size_gb: 50 - source_image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts + source_image: projects/ubuntu-os-cloud/global/images/family/ubuntu-minimal-2204-lts zone: us-central1-a project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" @@ -26,10 +26,11 @@ register: disk - name: create a network google.cloud.gcp_compute_network: - name: network-instance + name: "{{ resource_prefix }}" project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" + auto_create_subnetworks: true state: present register: network - name: create a address @@ -55,7 +56,6 @@ initialize_params: disk_type: local-ssd metadata: - startup-script-url: gs:://graphite-playground/bootstrap.sh cost-center: '12345' labels: environment: production @@ -80,12 +80,11 @@ boot: 'true' source: "{{ disk }}" - auto_delete: 'true' - interface: NVME + interface: SCS type: SCRATCH initialize_params: disk_type: local-ssd metadata: - startup-script-url: gs:://graphite-playground/bootstrap.sh cost-center: '12345' labels: environment: production @@ -135,7 +134,6 @@ initialize_params: disk_type: local-ssd metadata: - startup-script-url: gs:://graphite-playground/bootstrap.sh cost-center: '12345' labels: environment: production @@ -170,7 +168,6 @@ initialize_params: disk_type: local-ssd metadata: - startup-script-url: gs:://graphite-playground/bootstrap.sh cost-center: '12345' labels: environment: production @@ -220,7 +217,6 @@ initialize_params: disk_type: local-ssd metadata: - startup-script-url: gs:://graphite-playground/bootstrap.sh cost-center: '12345' labels: environment: production @@ -255,16 +251,17 @@ ignore_errors: true - name: delete a network google.cloud.gcp_compute_network: - name: network-instance + name: "{{ resource_prefix }}" project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" + auto_create_subnetworks: true state: absent register: network ignore_errors: true - name: delete a disk google.cloud.gcp_compute_disk: - name: disk-instance + name: "{{ resource_prefix }}" size_gb: 50 source_image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts zone: us-central1-a