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') }}"