Add stack removal on change to compose playbook

This commit is contained in:
Ethan Paul 2021-04-25 21:02:08 -04:00
parent 27aba94a92
commit 083a5ad1e9
No known key found for this signature in database
GPG Key ID: D0E2CBF1245E92BF
1 changed files with 9 additions and 0 deletions

View File

@ -70,6 +70,15 @@
owner: "{{ ansible_user }}"
group: docker
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
docker_stack: