From f810fff7328bb50f447d5339a2890359b5c1d820 Mon Sep 17 00:00:00 2001 From: HgO Date: Wed, 18 Aug 2021 21:20:52 +0200 Subject: [PATCH] rename haproxy certificates --- roles/haproxy/files/haproxy.py | 2 +- roles/haproxy/templates/telegraf/haproxy.conf.j2 | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/haproxy/files/haproxy.py b/roles/haproxy/files/haproxy.py index 538b187..26f3fcc 100644 --- a/roles/haproxy/files/haproxy.py +++ b/roles/haproxy/files/haproxy.py @@ -35,7 +35,7 @@ if not result: domain = result.group(1) # Define a path for HAproxy where you want to write the .pem file. -deploy_path="/etc/haproxy/ssl/" + domain + ".pem" +deploy_path="/etc/haproxy/ssl/" + domain.replace('.', '-') + ".pem" # The source files can be found in below paths, constructed with the lineage # path diff --git a/roles/haproxy/templates/telegraf/haproxy.conf.j2 b/roles/haproxy/templates/telegraf/haproxy.conf.j2 index 984173d..0769d50 100644 --- a/roles/haproxy/templates/telegraf/haproxy.conf.j2 +++ b/roles/haproxy/templates/telegraf/haproxy.conf.j2 @@ -12,7 +12,8 @@ ## Prefix your entry with 'file://' if you intend to use relative paths sources = [ {% for domain in letsencrypt.domains_gandi %} - "/etc/haproxy/ssl/{{ domain }}.pem", - "/etc/haproxy/ssl/{{ domain }}-ecdsa.pem"{% if not loop.last %},{% endif %} + "/etc/haproxy/ssl/{{ domain | replace('.', '-') }}.pem", + "/etc/haproxy/ssl/{{ domain | replace('.', '-') }}-ecdsa.pem"{% if not loop.last %},{% endif %} + {% endfor %} ] -- GitLab