Infra: Ansible speed up
[csit.git] / resources / tools / testbed-setup / ansible / roles / nomad / templates / nomad_systemd.service.j2
index 7652983..efe2e30 100644 (file)
@@ -1,19 +1,21 @@
 [Unit]
 Description=Nomad Service
-Documentation=https://www.nomadproject.io/docs/index.html
-Wants=network.target
-After=nomad.service
+Documentation=https://www.nomadproject.io/docs/
+Wants=network-online.target
+After=network-online.target
 
 [Service]
 # TODO: Decrease privilege
-User=root
-Group=root
-Environment="GOMAXPROCS=2"
+ExecReload=/bin/kill -SIGKILL $MAINPID
 ExecStart={{ nomad_bin_dir }}/nomad agent -config={{ nomad_config_dir }}
-ExecReload=/bin/kill -9 $MAINPID
 KillSignal=SIGTERM
+LimitNOFILE=infinity
+LimitNPROC=infinity
 Restart=on-failure
 RestartSec=1
+User=root
+Group=root
+Environment="GOMAXPROCS=2"
 
 [Install]
-WantedBy=default.target
+WantedBy=multi-user.target