This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
shoarma/ansible/roles/traefik/tasks/main.yml

31 lines
622 B
YAML
Raw Normal View History

2023-05-04 10:29:29 +00:00
- name: Create working directory
file:
path: /srv/traefik
state: directory
2023-05-02 10:22:16 +00:00
- name: Create Traefik network
docker_network:
name: traefik
driver: overlay
2023-05-03 06:09:16 +00:00
- name: Copy services definition
copy:
src: "{{ role_path }}/services.yml"
dest: /srv/traefik/services.yml
2023-05-02 10:22:16 +00:00
- 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