Update to 2022-08-18 19:00

This commit is contained in:
Daniel Berteaud 2022-08-18 19:00:16 +02:00
parent 2b8af76e60
commit 6ccd1030dc
3 changed files with 10 additions and 6 deletions

View File

@ -94,6 +94,8 @@ nomad_base_conf:
docker:
enabled: True
allow_privileged: True
volumes:
enabled: False
# You can set a list of caps allowed for containers. The default is the same set of caps than Docker, minus net_raw
# allow_caps: ["audit_write", "chown", "dac_override", "fowner", "fsetid", "kill", "mknod", "net_bind_service", "setfcap", "setgid", "setpcap", "setuid", "sys_chroot"]
raw_exec:

View File

@ -8,6 +8,7 @@
command: "{{ nomad_root_dir }}/bin/nomad operator snapshot save {{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
args:
creates: "{{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
when: nomad_conf.server.enabled
environment:
NOMAD_TOKEN: "{{ nomad_mgm_token | default(omit) }}"
tags: nomad

View File

@ -109,6 +109,11 @@ client {
plugin "docker" {
config {
allow_privileged = {{ nomad_conf.client.task_drivers.docker.allow_privileged | ternary('true', 'false') }}
{% if nomad_conf.client.task_drivers.docker.volumes.enabled %}
volumes {
enabled = true
}
{% endif %}
{% if nomad_conf.client.task_drivers.docker.allow_caps is defined %}
allow_caps = [
{% for cap in nomad_conf.client.task_drivers.docker.allow_caps %}
@ -120,23 +125,19 @@ plugin "docker" {
}
{% endif %}
{% if 'raw_exec' in nomad_enabled_task_drivers %}
plugin "raw_exec" {
config {
enabled = true
enabled = {{ ('raw_exec' in nomad_enabled_task_drivers) | ternary('true', 'false') }}
}
}
{% endif %}
{% if 'containerd-driver' in nomad_enabled_task_drivers %}
plugin "containerd-driver" {
config {
enabled = true
enabled = {{ ('containerd-driver' in nomad_enabled_task_drivers) | ternary('true', 'false') }}
containerd_runtime = "{{ nomad_conf.client.task_drivers['containerd-driver'].containerd_runtime }}"
allow_privileged = {{ nomad_conf.client.task_drivers['containerd-driver'].allow_privileged | ternary('true', 'false') }}
}
}
{% endif %}
{% endif %}
{% else %}