diff options
Diffstat (limited to 'fdio.infra.ansible/roles/nomad/templates/nomad_systemd.service.j2')
-rw-r--r-- | fdio.infra.ansible/roles/nomad/templates/nomad_systemd.service.j2 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fdio.infra.ansible/roles/nomad/templates/nomad_systemd.service.j2 b/fdio.infra.ansible/roles/nomad/templates/nomad_systemd.service.j2 new file mode 100644 index 0000000000..2a87c65063 --- /dev/null +++ b/fdio.infra.ansible/roles/nomad/templates/nomad_systemd.service.j2 @@ -0,0 +1,21 @@ +[Unit] +Description=Nomad Service +Documentation=https://www.nomadproject.io/docs/ +Wants=network-online.target +After=network-online.target + +[Service] +# TODO: Decrease privilege +ExecReload=/bin/kill -SIGHUP $MAINPID +ExecStart={{ nomad_bin_dir }}/nomad agent -config={{ nomad_config_dir }} +KillSignal=SIGTERM +LimitNOFILE=infinity +LimitNPROC=infinity +Restart=on-failure +RestartSec=1 +User=root +Group=root +Environment="GOMAXPROCS=2" + +[Install] +WantedBy=multi-user.target |