Add stack removal on change to compose playbook
This commit is contained in:
parent
27aba94a92
commit
083a5ad1e9
@ -70,6 +70,15 @@
|
|||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
group: docker
|
group: docker
|
||||||
mode: 0640
|
mode: 0640
|
||||||
|
register: _stack_file_state
|
||||||
|
|
||||||
|
- name: Remove the existing stack
|
||||||
|
when: _stack_file_state.changed is true
|
||||||
|
docker_stack:
|
||||||
|
name: "{{ _runtime_application }}"
|
||||||
|
state: absent
|
||||||
|
compose:
|
||||||
|
- "{{ omni_docker_configs }}/{{ _runtime_application }}/docker-compose.yaml"
|
||||||
|
|
||||||
- name: Deploy the stack
|
- name: Deploy the stack
|
||||||
docker_stack:
|
docker_stack:
|
||||||
|
Reference in New Issue
Block a user