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

31 lines
811 B
YAML
Raw Normal View History

2023-01-02 16:39:17 +00:00
- name: Create traefik app directory
file:
2023-01-07 19:32:42 +00:00
path: "{{ service_dir }}"
2023-01-02 16:39:17 +00:00
state: directory
- name: Create acme file
copy:
content: ""
2023-01-07 19:32:42 +00:00
dest: "{{ service_dir }}/acme.json"
2023-01-02 16:39:17 +00:00
force: no
2023-01-02 22:16:29 +00:00
mode: 0600
2023-01-02 16:39:17 +00:00
- name: Copy Docker Compose script
2023-01-07 19:32:42 +00:00
template:
src: "{{ role_path }}/templates/docker-compose.yml.j2"
dest: "{{ service_dir }}/docker-compose.yml"
2023-01-02 16:39:17 +00:00
- name: Copy traefik.toml
copy:
src: "{{ role_path }}/files/traefik.toml"
2023-01-07 19:32:42 +00:00
dest: "{{ service_dir }}/traefik.toml"
2023-01-02 16:39:17 +00:00
- name: Copy services.toml
copy:
src: "{{ role_path }}/files/services.toml"
2023-01-07 19:32:42 +00:00
dest: "{{ service_dir }}/services.toml"
2023-01-02 22:16:29 +00:00
- name: Create traefik network
docker_network:
name: "traefik"
2023-01-02 16:39:17 +00:00
- name: Start Docker Compose
docker_compose:
2023-01-07 19:32:42 +00:00
project_src: "{{ service_dir }}"
2023-01-02 16:39:17 +00:00
pull: true
remove_orphans: true