Fix restart
This commit is contained in:
parent
fbfd0f544e
commit
d9d497d9d7
@ -41,12 +41,21 @@
|
||||
remove_orphans: true
|
||||
pull: always
|
||||
build: always
|
||||
state: "{{ 'restarted' if item.changed else docker_compose_state }}"
|
||||
state: "{{ docker_compose_state }}"
|
||||
loop: "{{ copy_result.results }}"
|
||||
when: not item.failed
|
||||
register: result
|
||||
changed_when: "'Started' in result.stderr"
|
||||
|
||||
# - name: Force restart
|
||||
# community.docker.docker_compose_v2:
|
||||
# project_src: "{{ docker_compose_remote_project_dir + '/' + item.item.item.name }}"
|
||||
# remove_orphans: true
|
||||
# pull: always
|
||||
# build: always
|
||||
# state: "restarted"
|
||||
# loop: "{{ result.results }}"
|
||||
# when: not item.changed and (copy_result.results | selectattr('item.name', 'eq', item.item.item.name) | map(attribute='changed'))
|
||||
|
||||
- name: Prune docker
|
||||
community.docker.docker_prune:
|
||||
|
Loading…
Reference in New Issue
Block a user