docker: switch compose to v2

This commit is contained in:
Anton Iakimov 2024-05-30 16:29:14 +02:00
parent 9fbe3851b9
commit c1d16dce0b
No known key found for this signature in database
3 changed files with 5 additions and 7 deletions

View File

@ -54,6 +54,5 @@ postgres_ha_backup_user: 'root'
postgres_ha_consul_service: 'postgres'
# general container management
compose_recreate: 'smart'
compose_recreate: 'auto'
compose_state: 'present'
compose_restart: false

View File

@ -16,7 +16,7 @@
- name: 'Restart database container'
when: postgres_ha_hba.changed
docker_compose:
community.docker.docker_compose_v2:
project_src: '{{ postgres_ha_service_path }}'
files: '{{ postgres_ha_compose_file }}'
restarted: true
state: restarted

View File

@ -8,10 +8,9 @@
mode: 0644
- name: 'Create database container'
docker_compose:
community.docker.docker_compose_v2:
project_src: '{{ postgres_ha_service_path }}'
files: '{{ postgres_ha_compose_file }}'
state: '{{ compose_state }}'
restarted: '{{ compose_restart }}'
recreate: '{{ compose_recreate }}'
pull: true
pull: always