Skip to content

Commit

Permalink
GCP: Add support for bare metal instances (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks authored Oct 8, 2024
1 parent 9ce1754 commit c9c9f02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion automation/roles/cloud-resources/tasks/gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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') }}"
Expand Down

0 comments on commit c9c9f02

Please sign in to comment.