30 lines
615 B
YAML
30 lines
615 B
YAML
- 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: Create working directory
|
|
file:
|
|
path: /srv/traefik
|
|
state: directory
|
|
|
|
- name: Copy Docker stack file
|
|
copy:
|
|
src: "{{ role_path }}/docker-stack.yml"
|
|
dest: /srv/traefik/docker-stack.yml
|
|
|
|
- name: Deploy Docker stack
|
|
docker_stack:
|
|
name: traefik
|
|
compose:
|
|
- /srv/traefik/docker-stack.yml
|