diff --git a/modules/host/main.tf b/modules/host/main.tf index 77683b1d..b6c0602d 100644 --- a/modules/host/main.tf +++ b/modules/host/main.tf @@ -89,7 +89,7 @@ resource "hcloud_server" "server" { provisioner "local-exec" { command = <<-EOT timeout 600 bash < /dev/null + until ssh ${local.ssh_args} -i /tmp/${random_string.identity_file.id} ${local.ssh_proxy_jump} -o ConnectTimeout=10 -p ${var.ssh_port} root@${coalesce(self.ipv4_address, self.ipv6_address, try(one(self.network).ip, null))} true 2> /dev/null do echo "Waiting for MicroOS to become available..." sleep 3 diff --git a/modules/host/templates/cloudinit.yaml.tpl b/modules/host/templates/cloudinit.yaml.tpl index c00607a9..7c3f3f19 100644 --- a/modules/host/templates/cloudinit.yaml.tpl +++ b/modules/host/templates/cloudinit.yaml.tpl @@ -35,7 +35,7 @@ ${cloudinit_runcmd_common} # Configure default routes based on public ip availability %{if private_network_only~} # Private-only setup: eth0 is the private interface -- [ip, route, add, default, via, '${network_gw_ipv4}', dev, 'eth0', metric, '100'] +- [ip, route, add, default, via, '${network_gw_ipv4}', dev, 'enp7s0', metric, '100'] %{else~} # Standard setup: eth0 is public, configure both IPv4 and IPv6 - [ip, route, add, default, via, '172.31.1.1', dev, 'eth0', metric, '100']