From 1aae4b3b090e35a631e9035a26fa3eabdee8ec4b Mon Sep 17 00:00:00 2001 From: Karim Naufal Date: Fri, 18 Feb 2022 01:13:28 +0100 Subject: [PATCH] adjust ssh check loop time from sleep 2 to 3, to reduce the number of outputs --- agents.tf | 4 ++-- master.tf | 4 ++-- servers.tf | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/agents.tf b/agents.tf index 9faed3b..39562e6 100644 --- a/agents.tf +++ b/agents.tf @@ -44,14 +44,14 @@ resource "hcloud_server" "agents" { # Issue a reboot command and wait for the node to reboot provisioner "local-exec" { - command = "ssh ${local.ssh_args} root@${self.ipv4_address} '(sleep 2; reboot)&'; sleep 5" + command = "ssh ${local.ssh_args} root@${self.ipv4_address} '(sleep 2; reboot)&'; sleep 3" } provisioner "local-exec" { command = <<-EOT until ssh ${local.ssh_args} -o ConnectTimeout=2 root@${self.ipv4_address} true 2> /dev/null do echo "Waiting for MicroOS to reboot and become available..." - sleep 2 + sleep 3 done EOT } diff --git a/master.tf b/master.tf index a0f695b..fb1acd0 100644 --- a/master.tf +++ b/master.tf @@ -42,14 +42,14 @@ resource "hcloud_server" "first_control_plane" { # Issue a reboot command and wait for the node to reboot provisioner "local-exec" { - command = "ssh ${local.ssh_args} root@${self.ipv4_address} '(sleep 2; reboot)&'; sleep 5" + command = "ssh ${local.ssh_args} root@${self.ipv4_address} '(sleep 2; reboot)&'; sleep 3" } provisioner "local-exec" { command = <<-EOT until ssh ${local.ssh_args} -o ConnectTimeout=2 root@${self.ipv4_address} true 2> /dev/null do echo "Waiting for MicroOS to reboot and become available..." - sleep 2 + sleep 3 done EOT } diff --git a/servers.tf b/servers.tf index 99a076d..e574a7e 100644 --- a/servers.tf +++ b/servers.tf @@ -43,14 +43,14 @@ resource "hcloud_server" "control_planes" { # Issue a reboot command and wait for the node to reboot provisioner "local-exec" { - command = "ssh ${local.ssh_args} root@${self.ipv4_address} '(sleep 2; reboot)&'; sleep 5" + command = "ssh ${local.ssh_args} root@${self.ipv4_address} '(sleep 2; reboot)&'; sleep 3" } provisioner "local-exec" { command = <<-EOT until ssh ${local.ssh_args} -o ConnectTimeout=2 root@${self.ipv4_address} true 2> /dev/null do echo "Waiting for MicroOS to reboot and become available..." - sleep 2 + sleep 3 done EOT }