xoxys.k3s/templates/etc/systemd/system/k3s.service.j2

25 lines
566 B
Plaintext
Raw Normal View History

2022-10-03 20:58:05 +00:00
#jinja2: lstrip_blocks: True
{{ ansible_managed | comment }}
[Unit]
Description=K3s Kubernetes
Documentation=https://k3s.io
After=network-online.target
[Service]
Type=notify
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/k3s {{ "server" if k3s_server | bool else "agent" }} --config {{ k3s_config_dir }}/config.yaml
KillMode=process
Delegate=yes
LimitNOFILE=1048576
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
TimeoutStartSec=0
Restart=always
RestartSec=5s
[Install]
WantedBy=multi-user.target