docker: use docker_compose_v2 module
https://docs.ansible.com/ansible/latest/collections/community/docker/docker_compose_v2_module.html Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
1bb46448dc
commit
e266840902
|
@ -133,6 +133,6 @@ geth_cont_mem_ratio: 0.6
|
||||||
geth_cont_mem_limit: '{{ (ansible_memtotal_mb * geth_cont_mem_ratio|float) | int }}'
|
geth_cont_mem_limit: '{{ (ansible_memtotal_mb * geth_cont_mem_ratio|float) | int }}'
|
||||||
|
|
||||||
# general container management
|
# general container management
|
||||||
compose_recreate: 'smart'
|
compose_recreate: 'auto'
|
||||||
compose_state: 'present'
|
compose_state: 'present'
|
||||||
compose_restart: false
|
compose_pull: 'always'
|
||||||
|
|
|
@ -16,11 +16,9 @@
|
||||||
register: geth_all_compose
|
register: geth_all_compose
|
||||||
|
|
||||||
- name: Geth | Create containers
|
- name: Geth | Create containers
|
||||||
docker_compose:
|
community.docker.docker_compose_v2:
|
||||||
project_src: '{{ geth_service_path }}'
|
project_src: '{{ geth_service_path }}'
|
||||||
files: '{{ geth_all_compose.files | map(attribute="path") | list }}'
|
files: '{{ geth_all_compose.files | map(attribute="path") | list }}'
|
||||||
state: '{{ compose_state }}'
|
state: '{{ compose_state }}'
|
||||||
restarted: '{{ compose_restart }}'
|
recreate: '{{ compose_recreate }}'
|
||||||
recreate: '{{ compose_recreate | default("smart") }}'
|
pull: '{{ compose_pull }}'
|
||||||
pull: true
|
|
||||||
build: false
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
version: '3.7'
|
|
||||||
services:
|
services:
|
||||||
geth:
|
geth:
|
||||||
container_name: '{{ geth_cont_name }}'
|
container_name: '{{ geth_cont_name }}'
|
||||||
|
|
Loading…
Reference in New Issue