pre master

This commit is contained in:
Karim Naufal
2022-02-10 03:31:20 +01:00
parent e7f016fc59
commit 7a846f3a61
3 changed files with 11 additions and 11 deletions

View File

@@ -53,7 +53,7 @@ resource "hcloud_server" "agents" {
command = <<-EOT
until ssh ${local.ssh_args} -o ConnectTimeout=2 root@${self.ipv4_address} true 2> /dev/null
do
echo "Waiting for ssh to be ready..."
echo "Waiting for MicroOS to reboot and become available..."
sleep 2
done
EOT
@@ -97,7 +97,6 @@ resource "hcloud_server" "agents" {
# Run the agent
provisioner "remote-exec" {
inline = [
"set -ex",
# set the hostname in a persistent fashion
"hostnamectl set-hostname ${self.name}",
# first we disable automatic reboot (after transactional updates), and configure the reboot method as kured
@@ -105,9 +104,9 @@ resource "hcloud_server" "agents" {
# then we start k3s agent and join the cluster
"systemctl enable k3s-server",
<<-EOT
until systemctl status k3s-server > /dev/null
until systemctl status k3s-agent > /dev/null
do
systemctl start k3s-server
systemctl start k3s-agent
echo "Starting k3s-agent and joining the cluster..."
sleep 2
done