Skip to content

Commit

Permalink
Merge pull request #1592 from kube-hetzner/valkenburg-prevue-ch-patch-1
Browse files Browse the repository at this point in the history
Add timeout to "waiting for microos to become available"
  • Loading branch information
mysticaltech authored Dec 23, 2024
2 parents 4286ad0 + 7cb3c5b commit 9524d1e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/host/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ resource "hcloud_server" "server" {
# Wait for MicroOS to reboot and be ready.
provisioner "local-exec" {
command = <<-EOT
until ssh ${local.ssh_args} -i /tmp/${random_string.identity_file.id} -o ConnectTimeout=2 -p ${var.ssh_port} root@${self.ipv4_address} true 2> /dev/null
do
echo "Waiting for MicroOS to become available..."
sleep 3
done
timeout 600 bash <<EOF
until ssh ${local.ssh_args} -i /tmp/${random_string.identity_file.id} -o ConnectTimeout=2 -p ${var.ssh_port} root@${self.ipv4_address} true 2> /dev/null
do
echo "Waiting for MicroOS to become available..."
sleep 3
done
EOF
EOT
}

Expand Down

0 comments on commit 9524d1e

Please sign in to comment.