From ed1b8df67121cec602be6daf1ba5653b435bd4fe Mon Sep 17 00:00:00 2001 From: Olivier Navas Date: Tue, 12 Nov 2024 17:07:00 +0100 Subject: [PATCH] =?UTF-8?q?Ajoute=20la=20possibilit=C3=A9=20d'utiliser=20t?= =?UTF-8?q?raefik=20en=20ssl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- defaults/main.yml | 1 + templates/docker-compose.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index f3acf95..76f2997 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,3 @@ docker_ldapmanager_username_format: "{first_name}.{last_name}" docker_ldapmanager_ignore_cert_errors: "false" +docker_ldapmanager_traefik_enable_ssl: false \ No newline at end of file diff --git a/templates/docker-compose.yml b/templates/docker-compose.yml index c3e5753..2071212 100644 --- a/templates/docker-compose.yml +++ b/templates/docker-compose.yml @@ -14,7 +14,12 @@ services: labels: - "traefik.enable=true" - "traefik.docker.network=traefik" +{% if docker_ldapmanager_traefik_enable_ssl %} + - "traefik.http.routers.{{ docker_ldapmanager_service_id }}.entrypoints=websecure" + - "traefik.http.routers.{{ docker_ldapmanager_service_id }}.tls" +{% else %} - "traefik.http.routers.{{ docker_ldapmanager_service_id }}.entrypoints=web" +{% endif %} - "traefik.http.routers.{{ docker_ldapmanager_service_id }}.rule=Host(`{{ docker_ldapmanager_fqdn }}`)" - "traefik.http.services.{{ docker_ldapmanager_service_id }}.loadbalancer.server.port=80" networks: