Skip to content

Commit c9c9f02

Browse files
authored
GCP: Add support for bare metal instances (#780)
1 parent 9ce1754 commit c9c9f02

File tree

1 file changed

+2
-1
lines changed
  • automation/roles/cloud-resources/tasks

1 file changed

+2
-1
lines changed

automation/roles/cloud-resources/tasks/gcp.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@
261261
metadata:
262262
ssh-keys: "root:{{ ssh_key_content }}"
263263
scheduling:
264+
on_host_maintenance: "{{ 'TERMINATE' if (server_spot | bool or server_type is search('metal')) else 'MIGRATE' }}"
264265
preemptible: "{{ server_spot | default(gcp_compute_instance_preemptible | default(false)) | bool }}"
265266
tags:
266267
items:
@@ -468,7 +469,7 @@
468469
host: "{{ item.networkInterfaces[0].accessConfigs[0].natIP }}"
469470
port: 22
470471
delay: 5
471-
timeout: 300
472+
timeout: "{{ 1800 if server_type is search('metal') else 300 }}" # timeout 30 minutes for bare metal instances and 5 minutes for regular VMs
472473
loop: "{{ server_result.results }}"
473474
loop_control:
474475
label: "{{ item.networkInterfaces[0].accessConfigs[0].natIP | default('N/A') }}"

0 commit comments

Comments
 (0)