Use separate docker compose calls
This commit is contained in:
parent
29d3197bfc
commit
8c91c595f4
1 changed files with 16 additions and 4 deletions
|
|
@ -57,10 +57,22 @@
|
|||
group: sonny
|
||||
mode: '0755'
|
||||
|
||||
- name: Start container
|
||||
- name: Stop current containers
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: '{{ syncthing_app_dir }}'
|
||||
state: stopped
|
||||
|
||||
- name: Pull missing image
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: '{{ syncthing_app_dir }}'
|
||||
pull: missing
|
||||
|
||||
- name: Remove dangling containers
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: '{{ syncthing_app_dir }}'
|
||||
remove_orphans: true
|
||||
state: restarted
|
||||
pull: always
|
||||
wait: true
|
||||
|
||||
- name: Start container
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: '{{ syncthing_app_dir }}'
|
||||
state: present
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue