support multiple docker-compose*.yml files

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-05-11 11:54:40 +02:00
parent 3f6ef25470
commit 37f8a3ab06
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 9 additions and 0 deletions

View File

@ -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