From 294a775b98370dc3b797137d3844a89f6e4df8aa Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Sat, 15 Aug 2015 13:31:11 +0200 Subject: [PATCH] Workaround for include being defined too early This is crap but configuration for http scope cannot be both ordered and merged from map.jinja it seems, see issue #40. --- nginx/ng/files/nginx.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nginx/ng/files/nginx.conf b/nginx/ng/files/nginx.conf index 5baaa99..05d8f01 100644 --- a/nginx/ng/files/nginx.conf +++ b/nginx/ng/files/nginx.conf @@ -7,8 +7,13 @@ {%- elif value is mapping -%} {{ key|indent(ind, True) }}{{ operator }}{{ '{' }} {%- for k, v in value.items() %} + {%- if k != 'include' %} {{ nginx_block(v, k, operator, delim, (ind + indent_increment)) }} + {%- endif %} {%- endfor %} + {%- if 'include' in value.keys() %} +{{ nginx_block(value['include'], 'include', operator, delim, (ind + indent_increment)) }} + {%- endif %} {{ '}'|indent(ind, True) }} {%- elif value is iterable -%} {%- for v in value %}