diff options
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/nomad')
3 files changed, 11 insertions, 1 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/nomad/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/nomad/defaults/main.yaml index f88e882fce..864890c11e 100644 --- a/resources/tools/testbed-setup/ansible/roles/nomad/defaults/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/nomad/defaults/main.yaml @@ -84,6 +84,7 @@ nomad_node_class: "" nomad_no_host_uuid: true nomad_options: {} nomad_servers: [] +nomad_volumes: [] # Conf - server.hcl nomad_bootstrap_expect: 2 diff --git a/resources/tools/testbed-setup/ansible/roles/nomad/templates/client.hcl.j2 b/resources/tools/testbed-setup/ansible/roles/nomad/templates/client.hcl.j2 index f15616144f..f245697a22 100644 --- a/resources/tools/testbed-setup/ansible/roles/nomad/templates/client.hcl.j2 +++ b/resources/tools/testbed-setup/ansible/roles/nomad/templates/client.hcl.j2 @@ -19,4 +19,13 @@ client { } {% endif %} + {% if nomad_volumes -%} + {% for volume in nomad_volumes -%} + host_volume "{{ volume.name }}" { + path = "{{ volume.path }}" + read_only = {{ volume.read_only | bool | lower }} + } + {% endfor -%} + {% endif %} + } 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 efe2e30bd6..2a87c65063 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 @@ -6,7 +6,7 @@ After=network-online.target [Service] # TODO: Decrease privilege -ExecReload=/bin/kill -SIGKILL $MAINPID +ExecReload=/bin/kill -SIGHUP $MAINPID ExecStart={{ nomad_bin_dir }}/nomad agent -config={{ nomad_config_dir }} KillSignal=SIGTERM LimitNOFILE=infinity |