use docker_compose Ansible task instead of command

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-02-22 21:02:27 +01:00
parent 1110eef44a
commit 0d2b610c45
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 4 additions and 14 deletions

View File

@ -8,18 +8,8 @@
mode: 0644
register: beacon_node_compose_file
# This takes a while because it builds the image
# NOTE: --compatibility flag required for mem/cpu limits
- name: 'Create container: {{ beacon_node_cont_name }}'
command: >-
docker-compose
--compatibility
up
--quiet-pull
{% if compose_recreate or beacon_node_compose_file.changed %}
--force-recreate
{% endif %}
--no-color
-d
args:
chdir: '{{ beacon_node_cont_vol }}'
docker_compose:
project_src: '{{ beacon_node_cont_vol }}'
recreate: '{{ compose_recreate | ternary("always", "smart") }}'
pull: true