k3s install method ok
This commit is contained in:
parent
bffc921ed8
commit
addf44c39f
20
locals.tf
20
locals.tf
@ -35,27 +35,17 @@ locals {
|
|||||||
"umount /mnt"
|
"umount /mnt"
|
||||||
]
|
]
|
||||||
|
|
||||||
install_k3s_server = [
|
common_commands_install_k3s = [
|
||||||
"set -ex",
|
"set -ex",
|
||||||
# first we disable automatic reboot (after transactional updates), and configure the reboot method as kured
|
# 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",
|
"rebootmgrctl set-strategy off && echo 'REBOOT_METHOD=kured' > /etc/transactional-update.conf",
|
||||||
# prepare the k3s config directory
|
# prepare the k3s config directory
|
||||||
"mkdir -p /etc/rancher/k3s",
|
"mkdir -p /etc/rancher/k3s",
|
||||||
# move the config file into place
|
# move the config file into place
|
||||||
"mv /tmp/config.yaml /etc/rancher/k3s/config.yaml",
|
"mv /tmp/config.yaml /etc/rancher/k3s/config.yaml"
|
||||||
# install k3s server
|
|
||||||
"curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_EXEC=server sh -",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
install_k3s_agent = [
|
install_k3s_server = concat(local.common_commands_install_k3s, ["curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_EXEC=server sh -"])
|
||||||
"set -ex",
|
|
||||||
# first we disable automatic reboot (after transactional updates), and configure the reboot method as kured
|
install_k3s_agent = concat(local.common_commands_install_k3s, ["curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_EXEC=agent sh -"])
|
||||||
"rebootmgrctl set-strategy off && echo 'REBOOT_METHOD=kured' > /etc/transactional-update.conf",
|
|
||||||
# prepare the k3s config directory
|
|
||||||
"mkdir -p /etc/rancher/k3s",
|
|
||||||
# move the config file into place
|
|
||||||
"mv /tmp/config.yaml /etc/rancher/k3s/config.yaml",
|
|
||||||
# install k3s server
|
|
||||||
"curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true INSTALL_K3S_EXEC=agent sh -",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user