roles/nginx: Fix variable check in HTTPS template

Don't assume the variables for TLS certs exist.
This commit is contained in:
Alan Orth 2016-07-05 19:42:26 +03:00
parent 24e54c0580
commit 78dbdae783
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -4,7 +4,7 @@
{% set enable_hsts = item.enable_hsts | default("no") %}
{# first, check if the current vhost has a custom cert (perhaps self-signed) #}
{% if item.tls_certificate_path and item.tls_key_path %}
{% if item.tls_certificate_path is defined and item.tls_key_path is defined %}
# concatenated key + cert
# See: http://nginx.org/en/docs/http/configuring_https_servers.html