homelab/roles/traefik/tasks/main.yml

17 lines
434 B
YAML

- name: Install Traefik Configuration
copy:
src: traefik.yml
dest: traefik.yml
- name: Start Traefik container
docker_container:
name: "{{ traefik_name }}"
image: traefik:{{ traefik_version }}
restart_policy: always
ports:
- "{{ traefik_port }}:80"
- "{{ traefik_admin_port }}:8080"
volumes:
- ./traefik.yml:/etc/traefik/traefik.yml
- /var/run/docker.sock:/var/run/docker.sock