* ➕ Add default values to roles * 🚚 Move to use meta files for roles * 🛠 Fix descriptions * ➕ Add meta for server * 🚧 WIP * 🌟 Complete * 🧹 Ran and fix lint errors * 🔨 Fix required and default conflict --------- Co-authored-by: Techno Tim <timothystewart6@gmail.com>
28 lines
762 B
Django/Jinja
28 lines
762 B
Django/Jinja
[Unit]
|
|
Description=Lightweight Kubernetes
|
|
Documentation=https://k3s.io
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
ExecStartPre=-/sbin/modprobe br_netfilter
|
|
ExecStartPre=-/sbin/modprobe overlay
|
|
# Conditional snapshotter based on PXE boot status
|
|
ExecStart=/usr/local/bin/k3s agent \
|
|
--server https://{{ apiserver_endpoint | ansible.utils.ipwrap }}:6443 \
|
|
{% if is_pxe_booted | default(false) %}--snapshotter native \
|
|
{% endif %}--token {{ hostvars[groups[group_name_master | default('master')][0]]['token'] | default(k3s_token) }} \
|
|
{{ extra_agent_args }}
|
|
KillMode=process
|
|
Delegate=yes
|
|
LimitNOFILE=1048576
|
|
LimitNPROC=infinity
|
|
LimitCORE=infinity
|
|
TasksMax=infinity
|
|
TimeoutStartSec=0
|
|
Restart=always
|
|
RestartSec=5s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|