feat(docker): Add docker stack cleaning role
Runs before setting up any new stacks or pursue other modifications to docker deployments. Brings down any stack which is not currently defined in a role. This makes the whole installation more idempotent since we take care to not only bring _up_ any necessary docker containers, but also bring _down_ those that have become unnecessary.
This commit is contained in:
parent
4671801a84
commit
814f1e008f
2 changed files with 18 additions and 0 deletions
6
site.yml
6
site.yml
|
|
@ -18,6 +18,12 @@
|
|||
|
||||
- hosts: docker_swarm_manager_node
|
||||
tasks:
|
||||
- name: Remove stacks without roles
|
||||
import_role:
|
||||
role: docker-clean
|
||||
tags:
|
||||
- docker-clean
|
||||
|
||||
- name: Install caddy reverse proxy
|
||||
import_role:
|
||||
role: caddy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue