From 27a4abfcfd62744f6a3b84a8970562d89b1d0701 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 9 Dec 2015 23:29:33 +0200 Subject: [PATCH] roles/nginx: Add comments about defaults in templates It would be bettwe to set these defaults in the role's defaults, but we can't because they exist in dicts for each of the host's sites. Signed-off-by: Alan Orth --- roles/nginx/templates/https.j2 | 1 + roles/nginx/templates/vhost.conf.j2 | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/nginx/templates/https.j2 b/roles/nginx/templates/https.j2 index 154f957..29ac0f2 100644 --- a/roles/nginx/templates/https.j2 +++ b/roles/nginx/templates/https.j2 @@ -1,3 +1,4 @@ +{# helper variables and per-site defaults that we can't set in role defaults #} {% set domain_name = item.nginx_domain_name %} {# assume HSTS is off unless a vhost explicitly sets it to "yes" #} {% set enable_hsts = item.nginx_enable_hsts | default("no") %} diff --git a/roles/nginx/templates/vhost.conf.j2 b/roles/nginx/templates/vhost.conf.j2 index 4f424c3..8268ddc 100644 --- a/roles/nginx/templates/vhost.conf.j2 +++ b/roles/nginx/templates/vhost.conf.j2 @@ -1,3 +1,4 @@ +{# helper variables and per-site defaults that we can't set in role defaults #} {% set domain_name = item.nginx_domain_name %} {% set domain_aliases = item.nginx_domain_aliases | default("") %} {% set enable_https = item.nginx_enable_https | default("no") %}