aboutsummaryrefslogtreecommitdiffstats
path: root/roles/acme/templates/acme-client.conf.j2
blob: 0b9ea6c67c1eda6fdd47b010c897ae022dae7057 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# $OpenBSD: acme-client.conf,v 1.4 2020/09/17 09:13:06 florian Exp $
#
# managed by Ansible

authority letsencrypt {
	api url "https://acme-v02.api.letsencrypt.org/directory"
	account key "/etc/acme/letsencrypt-privkey.pem"
}

domain {{ global.domain_name }} {
	domain key "/etc/ssl/private/{{ global.domain_name }}.key"
	domain certificate "/etc/ssl/{{ global.domain_name }}.crt"
	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 %}
remember that computers suck.