tweaked k3s start
This commit is contained in:
parent
4b4bd0697a
commit
11dc61a39e
@ -59,11 +59,11 @@ resource "null_resource" "agents" {
|
|||||||
# Start the k3s agent and wait for it to have started
|
# Start the k3s agent and wait for it to have started
|
||||||
provisioner "remote-exec" {
|
provisioner "remote-exec" {
|
||||||
inline = [
|
inline = [
|
||||||
"systemctl start k3s-agent",
|
"systemctl start k3s-agent 2> /dev/null",
|
||||||
<<-EOT
|
<<-EOT
|
||||||
timeout 120 bash <<EOF
|
timeout 120 bash <<EOF
|
||||||
until systemctl status k3s-agent > /dev/null; do
|
until systemctl status k3s-agent > /dev/null; do
|
||||||
systemctl start k3s-agent
|
systemctl start k3s-agent 2> /dev/null
|
||||||
echo "Waiting for the k3s agent to start..."
|
echo "Waiting for the k3s agent to start..."
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
|
@ -65,11 +65,11 @@ resource "null_resource" "control_planes" {
|
|||||||
# Start the k3s server and wait for it to have started correctly
|
# Start the k3s server and wait for it to have started correctly
|
||||||
provisioner "remote-exec" {
|
provisioner "remote-exec" {
|
||||||
inline = [
|
inline = [
|
||||||
"systemctl start k3s",
|
"systemctl start k3s 2> /dev/null",
|
||||||
<<-EOT
|
<<-EOT
|
||||||
timeout 120 bash <<EOF
|
timeout 120 bash <<EOF
|
||||||
until systemctl status k3s > /dev/null; do
|
until systemctl status k3s > /dev/null; do
|
||||||
systemctl start k3s
|
systemctl start k3s 2> /dev/null
|
||||||
echo "Waiting for the k3s server to start..."
|
echo "Waiting for the k3s server to start..."
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user