From c960f62e2252c5dfcf06087f972dca29ae5031a0 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 16 Jun 2020 21:46:28 +0200 Subject: [PATCH] fix volume checks --- templates/services/droneci_compose.yml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/services/droneci_compose.yml.j2 b/templates/services/droneci_compose.yml.j2 index 9fac3e7..5f94a33 100644 --- a/templates/services/droneci_compose.yml.j2 +++ b/templates/services/droneci_compose.yml.j2 @@ -68,15 +68,15 @@ services: {% if droneci_memory_reservation is defined %} mem_reservation: {{ droneci_memory_reservation }} {% endif %} +{% if droneci_volumes | default([]) | rejectattr("bind") | list | length > 0 %} -{% if droneci_volumes | default([]) | rejectattr("bind") %} volumes: {% for volume in droneci_volumes | rejectattr("bind") %} {{ volume.name }}: {% endfor %} {% endif %} +{% if droneci_networks | default([]) | length > 0 %} -{% if droneci_networks | default([]) %} networks: {% for network in droneci_networks %} {{ network.name }}: