- name: Create working directory
file:
path: /srv/traefik
state: directory
- name: Create Traefik network
docker_network:
name: traefik
driver: overlay
- name: Copy services definition
copy:
src: "{{ role_path }}/services.yml"
dest: /srv/traefik/services.yml
- 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:
compose:
- /srv/traefik/docker-stack.yml