aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/nomad
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2020-06-10 08:05:37 +0000
committerpmikus <pmikus@cisco.com>2020-06-10 08:05:37 +0000
commite2e696735bc71114327361b5001561e6776a431b (patch)
tree3556a00458a2164123d5b9d782bdf9a684db75ff /resources/tools/testbed-setup/ansible/roles/nomad
parent61012e6fc1590376b327ebdc026be8278a277611 (diff)
Infra: Ansible speed up
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I24a22b1492593df937af2a17cd0c8684af7cd500
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/nomad')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/nomad/tasks/main.yaml7
-rw-r--r--resources/tools/testbed-setup/ansible/roles/nomad/templates/nomad_systemd.service.j218
2 files changed, 10 insertions, 15 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/nomad/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/nomad/tasks/main.yaml
index a8bf90f000..cd52b929bf 100644
--- a/resources/tools/testbed-setup/ansible/roles/nomad/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/nomad/tasks/main.yaml
@@ -58,13 +58,6 @@
tags:
- nomad-inst-package
-- name: Inst - Cleanup
- file:
- path: "{{ nomad_inst_dir }}/nomad"
- state: "absent"
- tags:
- - nomad-inst-package
-
- name: Conf - Create Directories "{{ nomad_data_dir }}"
file:
dest: "{{ nomad_data_dir }}"
diff --git a/resources/tools/testbed-setup/ansible/roles/nomad/templates/nomad_systemd.service.j2 b/resources/tools/testbed-setup/ansible/roles/nomad/templates/nomad_systemd.service.j2
index 7652983417..efe2e30bd6 100644
--- a/resources/tools/testbed-setup/ansible/roles/nomad/templates/nomad_systemd.service.j2
+++ b/resources/tools/testbed-setup/ansible/roles/nomad/templates/nomad_systemd.service.j2
@@ -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