diff --git a/roles/haproxy/files/haproxy.py b/roles/haproxy/files/haproxy.py index 538b1873f8804a3219a894e8da60d87c2f335738..26f3fcc8044de59c67e49026aa3a3f718a58b081 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 984173d362bb3b341cd6f0a22e60724d297b3c0e..0769d506e07e47bb0e57d603c5c0b475e324ffbf 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 %} ]