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