diff --git a/master.tf b/master.tf index 417da02..d13b9b2 100644 --- a/master.tf +++ b/master.tf @@ -74,19 +74,24 @@ resource "hcloud_server" "first_control_plane" { "hostnamectl set-hostname ${self.name}", # first we disable automatic reboot (after transactional updates), and configure the reboot method as kured "rebootmgrctl set-strategy off && echo 'REBOOT_METHOD=kured' > /etc/transactional-update.conf", - # then we initiate the cluster - "systemctl enable k3s-server", # prepare a directory for our post-installation kustomizations "mkdir -p /tmp/post_install", - # start k3s and wait for the cluster to be ready + # then we initiate the cluster + "systemctl enable k3s-server", + # start k3s + "systemctl start k3s-server", + # wait for k3s to get ready <<-EOT - until systemctl status k3s-server > /dev/null - do - systemctl start k3s-server - echo "Initiating the cluster..." - sleep 2 + timeout 120 bash <