diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index ea72ece..2aec72f 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -19,6 +19,17 @@ services: {% if container.privileged is defined %} privileged: {{ container.privileged }} {% endif %} +{% if container.cap_add is defined %} + cap_add: +{% for cap in container.cap_add %} + - {{ cap }} +{% endfor %} +{% endif %} +{% if container.devices is defined %} + devices: +{% for device in container.devices %} + - {{ device }} +{% endfor %} {% if container.volumes is defined %} volumes: {% for volume in container.volumes %} @@ -65,12 +76,6 @@ services: {% if container.restart is defined %} restart: {{ container.restart }} {% endif %} -{% if container.cap_add is defined %} - cap_add: -{% for cap in container.cap_add %} - - {{ cap }} -{% endfor %} -{% endif %} {% if container.command is defined %} command: {% for command in container.command %}