diff options
Diffstat (limited to 'roles/acme/templates')
-rw-r--r-- | roles/acme/templates/acme-client.conf.j2 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/acme/templates/acme-client.conf.j2 b/roles/acme/templates/acme-client.conf.j2 index 3ff6971..0b9ea6c 100644 --- a/roles/acme/templates/acme-client.conf.j2 +++ b/roles/acme/templates/acme-client.conf.j2 @@ -14,3 +14,15 @@ domain {{ global.domain_name }} { domain full chain certificate "/etc/ssl/{{ global.domain_name }}.fullchain.pem" sign with letsencrypt } + +{% for h in groups["servers"] %} +{% set h = dict(hostvars[h]) %} +{% for service in h.services if service.domain is defined %} +domain {{ service.domain }}.{{ global.domain_name }} { + domain key "/etc/ssl/private/{{ service.domain }}.{{ global.domain_name }}.key" + domain certificate "/etc/ssl/{{ service.domain }}.{{ global.domain_name }}.crt" + domain full chain certificate "/etc/ssl/{{ service.domain }}.{{ global.domain_name }}.fullchain.pem" + sign with letsencrypt +} +{% endfor %} +{% endfor %} |