Move traefik file provider to use directory rather than single file
This makes future composition possible
This commit is contained in:
parent
0353887590
commit
b11dbfc829
3 changed files with 11 additions and 4 deletions
|
@ -25,7 +25,7 @@ providers:
|
|||
watch: true
|
||||
exposedByDefault: false
|
||||
file:
|
||||
filename: /etc/traefik/file-provider.yml
|
||||
directory: /etc/traefik/conf
|
||||
|
||||
api:
|
||||
dashboard: true
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue