From 8787722c6cf64bac82853e7c1b44f726dd902e65 Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Thu, 7 Nov 2019 18:11:36 -0500 Subject: [PATCH] Made traefik.yml a template --- roles/traefik/defaults/main.yml | 1 + roles/traefik/tasks/main.yml | 2 +- roles/traefik/traefik.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/traefik/defaults/main.yml b/roles/traefik/defaults/main.yml index b3ef50f..03bc851 100644 --- a/roles/traefik/defaults/main.yml +++ b/roles/traefik/defaults/main.yml @@ -2,3 +2,4 @@ traefik_name: traefik traefik_version: latest traefik_port: 8000 traefik_admin_port: 8080 +traefik_domain: localhost diff --git a/roles/traefik/tasks/main.yml b/roles/traefik/tasks/main.yml index 50a3d7f..fcacad8 100644 --- a/roles/traefik/tasks/main.yml +++ b/roles/traefik/tasks/main.yml @@ -1,5 +1,5 @@ - name: Install Traefik Configuration - copy: + template: src: traefik.yml dest: traefik.yml notify: Restart Traefik container diff --git a/roles/traefik/traefik.yml b/roles/traefik/traefik.yml index 69843c4..e312578 100644 --- a/roles/traefik/traefik.yml +++ b/roles/traefik/traefik.yml @@ -1,7 +1,7 @@ # Docker configuration backend providers: docker: - defaultRule: "Host(`{{ trimPrefix `/` .Name }}.docker.localhost`)" + defaultRule: "Host(`{{'{{'}} trimPrefix `/` .Name }}.{{ traefik_domain }}`)" # API and dashboard configuration api: