add simple traefik stack

This commit is contained in:
Pim Kunis 2023-05-02 12:22:16 +02:00
parent b8afb2ac64
commit 4678724dcf
4 changed files with 63 additions and 1 deletions

View file

@ -0,0 +1,20 @@
- name: Create Traefik network
docker_network:
name: traefik
driver: overlay
- name: Create working directory
file:
path: /srv/traefik
state: directory
- name: Copy Docker stack file
template:
src: "{{ role_path }}/docker-stack.yml.j2"
dest: /srv/traefik/docker-stack.yml
- name: Deploy Docker stack
docker_stack:
name: traefik
compose:
- /srv/traefik/docker-stack.yml