From c9c9f02d0dd7991e3966f0e6c35dd4f3d3c45af0 Mon Sep 17 00:00:00 2001 From: Vitaliy Kukharik <37010174+vitabaks@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:34:52 +0300 Subject: [PATCH] GCP: Add support for bare metal instances (#780) --- automation/roles/cloud-resources/tasks/gcp.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automation/roles/cloud-resources/tasks/gcp.yml b/automation/roles/cloud-resources/tasks/gcp.yml index 29376bb03..a347d148c 100644 --- a/automation/roles/cloud-resources/tasks/gcp.yml +++ b/automation/roles/cloud-resources/tasks/gcp.yml @@ -261,6 +261,7 @@ metadata: ssh-keys: "root:{{ ssh_key_content }}" scheduling: + on_host_maintenance: "{{ 'TERMINATE' if (server_spot | bool or server_type is search('metal')) else 'MIGRATE' }}" preemptible: "{{ server_spot | default(gcp_compute_instance_preemptible | default(false)) | bool }}" tags: items: @@ -468,7 +469,7 @@ host: "{{ item.networkInterfaces[0].accessConfigs[0].natIP }}" port: 22 delay: 5 - timeout: 300 + timeout: "{{ 1800 if server_type is search('metal') else 300 }}" # timeout 30 minutes for bare metal instances and 5 minutes for regular VMs loop: "{{ server_result.results }}" loop_control: label: "{{ item.networkInterfaces[0].accessConfigs[0].natIP | default('N/A') }}"