From e2e696735bc71114327361b5001561e6776a431b Mon Sep 17 00:00:00 2001 From: pmikus Date: Wed, 10 Jun 2020 08:05:37 +0000 Subject: Infra: Ansible speed up Signed-off-by: pmikus Change-Id: I24a22b1492593df937af2a17cd0c8684af7cd500 --- .../testbed-setup/ansible/roles/docker/tasks/main.yaml | 4 ---- .../testbed-setup/ansible/roles/nomad/tasks/main.yaml | 7 ------- .../roles/nomad/templates/nomad_systemd.service.j2 | 18 ++++++++++-------- 3 files changed, 10 insertions(+), 19 deletions(-) (limited to 'resources/tools') diff --git a/resources/tools/testbed-setup/ansible/roles/docker/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/docker/tasks/main.yaml index d3eef82781..f0cb0d19cf 100644 --- a/resources/tools/testbed-setup/ansible/roles/docker/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/docker/tasks/main.yaml @@ -9,8 +9,6 @@ package: name: "{{ docker_package }}" state: "{{ docker_package_state }}" - notify: - - "Restart Docker" tags: - docker-inst-package @@ -68,5 +66,3 @@ when: docker_users tags: - docker-conf-user - -- meta: flush_handlers 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 -- cgit 1.2.3-korg