diff --git a/tasks/traefik.yml b/tasks/traefik.yml index 2510c36..252fd09 100644 --- a/tasks/traefik.yml +++ b/tasks/traefik.yml @@ -14,13 +14,13 @@ name: 'traefik' tags: ['docker_traefik'] -- name: traefik | create letsencrypt docker volume +- name: traefik | create letsencrypt docker volume docker_volume: name: traefik__letsencrypt register: register_docker_volume_traefik__letsencrypt tags: ['docker_traefik'] -- name: traefik | create config docker volume +- name: traefik | create config docker volume docker_volume: name: traefik__etc_traefik register: register_docker_volume_traefik__etc_traefik @@ -35,3 +35,10 @@ mode: 0644 notify: traefik-restart tags: ['docker_traefik'] + +- name: traefik | create dynamic config path + file: + path: /var/lib/docker/volumes/traefik__etc_traefik/_data/dynamic + state: directory + mode: '0755' + tags: ['docker_traefik'] \ No newline at end of file diff --git a/templates/config/traefik/traefik.yml.j2 b/templates/config/traefik/traefik.yml.j2 index bbda0ad..e51b1fc 100644 --- a/templates/config/traefik/traefik.yml.j2 +++ b/templates/config/traefik/traefik.yml.j2 @@ -33,3 +33,8 @@ certificatesResolvers: email: {{ traefik_letsencrypt_email }} storage: /letsencrypt/acme.json tlschallenge: true + +providers: + file: + directory: /etc/traefik/dynamic + watch: true