From 78dbdae783b304d3581ecd679fde14d030981bef Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Tue, 5 Jul 2016 19:42:26 +0300 Subject: [PATCH] roles/nginx: Fix variable check in HTTPS template Don't assume the variables for TLS certs exist. --- roles/nginx/templates/https.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nginx/templates/https.j2 b/roles/nginx/templates/https.j2 index 2c19d5c..6495e06 100644 --- a/roles/nginx/templates/https.j2 +++ b/roles/nginx/templates/https.j2 @@ -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