Move traefik file provider to use directory rather than single file

This makes future composition possible
This commit is contained in:
Jake Howard 2020-12-22 15:53:03 +00:00
parent 0353887590
commit b11dbfc829
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 11 additions and 4 deletions

View file

@ -25,7 +25,7 @@ providers:
watch: true
exposedByDefault: false
file:
filename: /etc/traefik/file-provider.yml
directory: /etc/traefik/conf
api:
dashboard: true

View file

@ -8,7 +8,14 @@
- name: Create config directory
file:
path: /opt/traefik/traefik
path: /opt/traefik/traefik/
state: directory
mode: "{{ docker_compose_directory_mask }}"
become: true
- name: Create file provider directory
file:
path: /opt/traefik/traefik/conf
state: directory
mode: "{{ docker_compose_directory_mask }}"
become: true
@ -34,8 +41,8 @@
- name: Install file provider
template:
src: files/file-provider.yml
dest: /opt/traefik/traefik/file-provider.yml
src: files/file-provider-main.yml
dest: /opt/traefik/traefik/conf/main.yml
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
notify: restart traefik