letsencrypt: move the combined cert to a template

content is "undefined" if using variables and you can't put a newline in
it, so just move this to a simple template.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2023-01-25 10:01:18 -08:00
parent 925760331c
commit abf5e66531
2 changed files with 4 additions and 3 deletions
roles/letsencrypt
tasks
templates

View file

@ -137,10 +137,9 @@
when: certbot_addhost is defined when: certbot_addhost is defined
- name: Install certificate bundle - name: Install certificate bundle
copy: > template: >
dest=/etc/pki/tls/certs/{{site_name}}.bundle.cert dest=/etc/pki/tls/certs/{{site_name}}.bundle.cert
content="{{certbot_certificate.stdout} src=combined.j2
certbot_chain.stdout}}"
owner=root owner=root
group=root group=root
mode=0644 mode=0644

View file

@ -0,0 +1,2 @@
{{certbot_certificate.stdout}}
{{certbot_chain.stdout}}