24 lines
600 B
Text
24 lines
600 B
Text
|
[Unit]
|
||
|
Description=k3s
|
||
|
Wants=network-online.target
|
||
|
After=network-online.target
|
||
|
|
||
|
[Service]
|
||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||
|
{% if k3s_role == 'server' %}
|
||
|
ExecStart=/usr/local/bin/k3s server --write-kubeconfig-mode 644 --disable servicelb --disable traefik
|
||
|
{% else %}
|
||
|
ExecStart=/usr/local/bin/k3s agent --server https://hardtack1.minhas.io:6443 --token {{ hostvars['hardtack1.minhas.io'].k3s_node_token }}
|
||
|
{% endif %}
|
||
|
KillMode=process
|
||
|
KillSignal=SIGINT
|
||
|
LimitNOFILE=infinity
|
||
|
LimitNPROC=infinity
|
||
|
Restart=on-failure
|
||
|
RestartSec=2
|
||
|
StartLimitBurst=3
|
||
|
TasksMax=infinity
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|