From 37f8a3ab06cd08c9053b292f60e734962cab616d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 11 May 2021 11:54:40 +0200 Subject: [PATCH] support multiple docker-compose*.yml files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- tasks/container.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tasks/container.yml b/tasks/container.yml index 9b0f829..5a7cc53 100644 --- a/tasks/container.yml +++ b/tasks/container.yml @@ -7,8 +7,17 @@ group: docker mode: 0644 +# Take into account additional docker-compose.yml files. +- name: Find all Docker Compose files + find: + paths: '{{ beacon_node_cont_vol }}' + patterns: 'docker-compose*.yml' + recurse: false + register: all_compose_files + - name: 'Create container: {{ beacon_node_cont_name }}' docker_compose: project_src: '{{ beacon_node_cont_vol }}' + files: '{{ all_compose_files.files | map(attribute="path") | list }}' recreate: '{{ compose_recreate | ternary("always", "smart") }}' pull: true