fixed a mistake
This commit is contained in:
parent
ba61a1e3ed
commit
d5e639afd2
1 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,8 @@ from pyinfra.api import deploy
|
|||
from pyinfra.facts import files
|
||||
from pyinfra.operations import files as files_op
|
||||
from pyinfra.operations import server
|
||||
|
||||
K3S_COMMON_FLAGS = "--disable local-storage --disable=servicelb --disable=traefik"
|
||||
IS_CREATED_FILE = "/pyinfra/.k3s-init-completed"
|
||||
|
||||
@deploy("Deploy K3S")
|
||||
|
@ -25,7 +27,7 @@ def deploy_k3s():
|
|||
name="Start K3S master",
|
||||
commands=[
|
||||
"curl -sfL https://get.k3s.io | "
|
||||
"sh -s - server --cluster-init",
|
||||
f"sh -s - server --cluster-init {K3S_COMMON_FLAGS}",
|
||||
],
|
||||
_env=dict(K3S_TOKEN=k3s_config.get("token")),
|
||||
)
|
||||
|
@ -34,7 +36,7 @@ def deploy_k3s():
|
|||
name="Start K3S worker",
|
||||
commands=[
|
||||
"curl -sfL https://get.k3s.io | "
|
||||
f"sh -s - server --server https://{k3s_config.get('master')}:6443",
|
||||
f"sh -s - server --server https://{k3s_config.get('master')}:6443 {K3S_COMMON_FLAGS}",
|
||||
],
|
||||
_env=dict(K3S_TOKEN=k3s_config.get("token")),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue