From 8ce56f15e0751870b56805010241dcfe8389b10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sat, 17 Dec 2022 21:59:58 +0100 Subject: refactor: remove global __services from roles --- roles/acme/templates/acme-client.conf.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'roles/acme/templates') diff --git a/roles/acme/templates/acme-client.conf.j2 b/roles/acme/templates/acme-client.conf.j2 index 3792009..583c3d5 100644 --- a/roles/acme/templates/acme-client.conf.j2 +++ b/roles/acme/templates/acme-client.conf.j2 @@ -14,9 +14,9 @@ domain {{ acme_domain_name }} { } {% call(h) macros.loop_valid_hosts("servers") -%} -{% for service in h.__services if service.domain is defined %} -domain {{ service.domain }}.{{ acme_domain_name }} { - {% set domain = service.domain ~ "." ~ acme_domain_name %} +{% for name, rules in h.acme_rules.items() if rules.domain is defined %} +domain {{ rules.domain }}.{{ acme_domain_name }} { + {% set domain = rules.domain ~ "." ~ acme_domain_name %} alternative names { www.{{ domain }} } domain key "/etc/ssl/private/{{ domain }}.key" domain full chain certificate "/etc/ssl/{{ domain }}.crt" -- cgit v1.2.3