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 Description=Lightweight Kubernetes
Documentation=https://k3s.io Documentation=https://k3s.io
After=network-online.target After=network-online.target
[Service] [Service]
Type=notify
ExecStartPre=-/sbin/modprobe br_netfilter ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/k3s server {{ extra_server_args | default("") }} ExecStart=/usr/local/bin/k3s server {{ extra_server_args | default("") }}
@ -12,6 +14,7 @@ LimitNOFILE=infinity
LimitNPROC=infinity LimitNPROC=infinity
LimitCORE=infinity LimitCORE=infinity
TasksMax=infinity TasksMax=infinity
TimeoutStartSec=infinity
Restart=always Restart=always
RestartSec=5s RestartSec=5s

View File

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