attempt to fix waitForAction

This commit is contained in:
Karim Naufal 2022-01-12 15:26:52 +01:00
parent 7582b7299e
commit 0415a43e9e
3 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ resource "hcloud_server" "agents" {
} }
provisioner "local-exec" { provisioner "local-exec" {
command = "sleep 60 && ping ${self.ipv4_address} | grep --line-buffered 'bytes from' | head -1 && sleep 60" command = "sleep 60 && ping ${self.ipv4_address} | grep --line-buffered 'bytes from' | head -1 && sleep 100"
} }
network { network {

View File

@ -43,7 +43,7 @@ resource "hcloud_server" "first_control_plane" {
# Wait for k3os to be ready and fetch kubeconfig.yaml # Wait for k3os to be ready and fetch kubeconfig.yaml
provisioner "local-exec" { provisioner "local-exec" {
command = <<-EOT command = <<-EOT
sleep 60 && ping ${self.ipv4_address} | grep --line-buffered "bytes from" | head -1 && sleep 60 && scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${var.private_key} rancher@${self.ipv4_address}:/etc/rancher/k3s/k3s.yaml ${path.module}/kubeconfig.yaml sleep 60 && ping ${self.ipv4_address} | grep --line-buffered "bytes from" | head -1 && sleep 100 && scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${var.private_key} rancher@${self.ipv4_address}:/etc/rancher/k3s/k3s.yaml ${path.module}/kubeconfig.yaml
sed -i -e 's/127.0.0.1/${self.ipv4_address}/g' ${path.module}/kubeconfig.yaml sed -i -e 's/127.0.0.1/${self.ipv4_address}/g' ${path.module}/kubeconfig.yaml
EOT EOT
} }

View File

@ -44,7 +44,7 @@ resource "hcloud_server" "control_planes" {
} }
provisioner "local-exec" { provisioner "local-exec" {
command = "sleep 60 && ping ${self.ipv4_address} | grep --line-buffered 'bytes from' | head -1 && sleep 60" command = "sleep 60 && ping ${self.ipv4_address} | grep --line-buffered 'bytes from' | head -1 && sleep 100"
} }
network { network {