template fixes

This commit is contained in:
IronicBadger 2019-05-20 11:24:07 -04:00
parent 141fab847c
commit 26e910573c
2 changed files with 6 additions and 9 deletions

View File

@ -1,12 +1,12 @@
---
- name: create destination dir for generated docker-compose.yml
- name: create destination dir for generated readme
file:
path: "{{ docker_compose_generator_output_path }}"
path: "{{ output_path }}"
state: directory
- name: write docker-compose file
template:
src: ../templates/docker-compose.yml.j2
dest: "{{ docker_compose_generator_output_path }}/docker-compose.yml"
dest: "{{ output_path }}/docker-compose.yml"
owner: "{{ docker_compose_generator_uid }}"
group: "{{ docker_compose_generator_gid }}"

View File

@ -22,12 +22,6 @@ services:
- {{ item }}
{% endfor %}
{% endif %}
{% if item.labels is defined %}}
labels:
{% for item in item.labels %}
- "{{ item }}"
{% endfor %}
{% endif %}
{% if ( item.environment is defined ) or ( item.include_global_env_vars ) %}
environment:
{% if item.include_global_env_vars %}
@ -62,6 +56,9 @@ services:
- {{ item }}
{% endfor %}
{% endif %}
{% if item.command is defined %}
command: {{ item.command }}
{% endif %}
{% if item.security_opt is defined %}
security_opt:
{% for item in item.security_opt %}