mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-16 18:23:40 +02:00
Update to 2022-08-18 19:00
This commit is contained in:
parent
2b8af76e60
commit
6ccd1030dc
@ -94,6 +94,8 @@ nomad_base_conf:
|
|||||||
docker:
|
docker:
|
||||||
enabled: True
|
enabled: True
|
||||||
allow_privileged: 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
|
# 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"]
|
# allow_caps: ["audit_write", "chown", "dac_override", "fowner", "fsetid", "kill", "mknod", "net_bind_service", "setfcap", "setgid", "setpcap", "setuid", "sys_chroot"]
|
||||||
raw_exec:
|
raw_exec:
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
command: "{{ nomad_root_dir }}/bin/nomad operator snapshot save {{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
|
command: "{{ nomad_root_dir }}/bin/nomad operator snapshot save {{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
|
||||||
args:
|
args:
|
||||||
creates: "{{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
|
creates: "{{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
|
||||||
|
when: nomad_conf.server.enabled
|
||||||
environment:
|
environment:
|
||||||
NOMAD_TOKEN: "{{ nomad_mgm_token | default(omit) }}"
|
NOMAD_TOKEN: "{{ nomad_mgm_token | default(omit) }}"
|
||||||
tags: nomad
|
tags: nomad
|
||||||
|
@ -109,6 +109,11 @@ client {
|
|||||||
plugin "docker" {
|
plugin "docker" {
|
||||||
config {
|
config {
|
||||||
allow_privileged = {{ nomad_conf.client.task_drivers.docker.allow_privileged | ternary('true', 'false') }}
|
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 %}
|
{% if nomad_conf.client.task_drivers.docker.allow_caps is defined %}
|
||||||
allow_caps = [
|
allow_caps = [
|
||||||
{% for cap in nomad_conf.client.task_drivers.docker.allow_caps %}
|
{% for cap in nomad_conf.client.task_drivers.docker.allow_caps %}
|
||||||
@ -120,23 +125,19 @@ plugin "docker" {
|
|||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if 'raw_exec' in nomad_enabled_task_drivers %}
|
|
||||||
plugin "raw_exec" {
|
plugin "raw_exec" {
|
||||||
config {
|
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" {
|
plugin "containerd-driver" {
|
||||||
config {
|
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 }}"
|
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') }}
|
allow_privileged = {{ nomad_conf.client.task_drivers['containerd-driver'].allow_privileged | ternary('true', 'false') }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user