Add Type and TimeoutStartSec to ansible systemd unit files

This commit is contained in:
Arpan Kapoor 2020-03-01 19:31:31 +05:30
parent 069bc21fd7
commit 4f57cdd5e0
No known key found for this signature in database
GPG Key ID: 2A7CF43212493E08
2 changed files with 6 additions and 0 deletions

View File

@ -2,7 +2,9 @@
Description=Lightweight 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 {{ extra_server_args | default("") }}
@ -12,6 +14,7 @@ LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
TimeoutStartSec=infinity
Restart=always
RestartSec=5s

View File

@ -2,7 +2,9 @@
Description=Lightweight Kubernetes
Documentation=https://k3s.io
After=network-online.target
[Service]
Type=notify
ExecStart=/usr/local/bin/k3s agent --server https://{{ master_ip }}:6443 --token {{ hostvars[groups['master'][0]]['token'] }}
KillMode=process
Delegate=yes
@ -10,6 +12,7 @@ LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
TimeoutStartSec=infinity
Restart=always
RestartSec=5s