From ceb8391c0651efbc36dd72011158301be53d73de Mon Sep 17 00:00:00 2001 From: Jean-Marie Mineau Date: Wed, 3 Aug 2022 22:37:58 +0200 Subject: [PATCH] add root snippets support --- templates/http_server.j2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/http_server.j2 b/templates/http_server.j2 index 1fa9a29..0621a77 100644 --- a/templates/http_server.j2 +++ b/templates/http_server.j2 @@ -32,7 +32,7 @@ server { server_name {{ item.key }}; - {# <- TODO: move this to defaut root snippets -> -#} + {# <- TODO: move this to defaut root snippets ? -> -#} include /etc/nginx/mime.types; default_type application/octet-stream; @@ -43,7 +43,13 @@ server { # "A man is not dead while his name is still spoken." -- Going Postal add_header X-Clacks-Overhead "GNU {{ ', '.join(in_memoriam) }}"; {% endif -%} - {# <- TODO: move this to defaut root snippets -> -#} + {# <- TODO: move this to defaut root snippets ?-> -#} + + {% filter indent(width=4) -%} + {%- for config in (item.value.root_snippets | default([])) -%} + {{ config }} + + {%- endfor -%} # Logs access_log /var/log/nginx/{{ item.key }}.log;