support all docker arguments #2

Merged
lanson merged 10 commits from feature/support-all-docker-args into main 2023-12-10 18:09:49 +00:00
2 changed files with 8 additions and 5 deletions
Showing only changes of commit b466741102 - Show all commits

View File

@ -10,6 +10,9 @@ docker_systemd_service_flags:
- volume:
- /root:/mnt/volume
- /var:/test:ro
- health-cmd: curl localhost:80
- health-retries: 10
docker_systemd_service_container_cmd: []
#! TO REPLACE
docker_systemd_service_container_labels: []

View File

@ -9,13 +9,13 @@
{%- if item is mapping %}
{% set key = item.keys() | first %}
{% set value = item[key] %}
{%- if value is string %}
--{{ key }} {{ value }} \
{%- elif value is iterable %}
{%- if value.__class__.__name__ == 'list' %}
{% for val in value %}
--{{ key }} {{ val }} \{% if not loop.last +%}
--{{ key }} "{{ val }}" \{% if not loop.last +%}
{% endif %}{% endfor %}
{% endif -%}
{%- else %}
--{{ key }} "{{ value }}" \
{%- endif %}
{%- elif item is string %}
--{{ item }} \
{%- endif -%}