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 watch: true
exposedByDefault: false exposedByDefault: false
file: file:
filename: /etc/traefik/file-provider.yml directory: /etc/traefik/conf
api: api:
dashboard: true dashboard: true

View file

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