This repository has been archived on 2023-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
max/roles/traefik/tasks/main.yml
2023-01-07 19:08:49 +01:00

30 lines
758 B
YAML

- name: Create traefik app directory
file:
path: /srv/traefik
state: directory
- name: Create acme file
copy:
content: ""
dest: /srv/traefik/acme.json
force: no
mode: 0600
- name: Copy Docker Compose script
copy:
src: "{{ role_path }}/files/docker-compose.yml"
dest: /srv/traefik/docker-compose.yml
- name: Copy traefik.toml
copy:
src: "{{ role_path }}/files/traefik.toml"
dest: /srv/traefik/traefik.toml
- name: Copy services.toml
copy:
src: "{{ role_path }}/files/services.toml"
dest: /srv/traefik/services.toml
- name: Create traefik network
docker_network:
name: "traefik"
- name: Start Docker Compose
docker_compose:
project_src: /srv/traefik
pull: true
remove_orphans: true