diff --git a/nginx/templates/nginx-server-ssl.conf.j2 b/nginx/templates/nginx-server-ssl.conf.j2 index 90a70fa..aeeb1c1 100644 --- a/nginx/templates/nginx-server-ssl.conf.j2 +++ b/nginx/templates/nginx-server-ssl.conf.j2 @@ -1,6 +1,6 @@ -{% if letsencrypt_acme_install %} -ssl_certificate {{ letsencrypt_acme_certs_dir }}/fullchain; -ssl_certificate_key {{ letsencrypt_acme_certs_dir }}/privkey; +{% if letsencrypt_acme_install is defined and letsencrypt_acme_install %} +ssl_certificate {{ letsencrypt_acme_certs_dir | default('/var/lib/acme/live/{{ ansible_fqdn }}') }}/fullchain; +ssl_certificate_key {{ letsencrypt_acme_certs_dir | default('/var/lib/acme/live/{{ ansible_fqdn }}') }}/privkey; {% endif %} ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m;