From f16d800c833d11e645db33817e5422f55ad5985d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Moso=C5=84?= Date: Tue, 8 May 2018 19:07:20 +0200 Subject: [PATCH 1/3] Allow to use load_module without including external files --- nginx/ng/files/nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nginx/ng/files/nginx.conf b/nginx/ng/files/nginx.conf index e32edea..91efad6 100644 --- a/nginx/ng/files/nginx.conf +++ b/nginx/ng/files/nginx.conf @@ -32,6 +32,10 @@ # # This file is managed by Salt. +{% if 'load_module' in config.keys() %} +{{ nginx_block(config.pop('load_module'), 'load_module') }} +{%- endif -%} + {% if 'include' in config.keys() %} {{ nginx_block(config.pop('include'), 'include') }} {%- endif -%} From 9c4634d40a3bb58e7fc67641f1b5f44c219f2414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Moso=C5=84?= Date: Fri, 29 Jun 2018 12:46:12 +0200 Subject: [PATCH 2/3] Example for load_module --- pillar.example | 1 + 1 file changed, 1 insertion(+) diff --git a/pillar.example b/pillar.example index a91ad14..017e775 100644 --- a/pillar.example +++ b/pillar.example @@ -85,6 +85,7 @@ nginx: # options; if it is found other options (worker_processes: 4 and so # on) are not processed and just upload the file from source worker_processes: 4 + load_module: modules/ngx_http_lua_module.so pid: /var/run/nginx.pid ### Directory location must exist events: worker_connections: 768 From c75ad643485a6b0642b4135e1b1d038abbeaaabd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Moso=C5=84?= Date: Fri, 29 Jun 2018 12:55:17 +0200 Subject: [PATCH 3/3] Example for load_module: comment how it works --- pillar.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar.example b/pillar.example index 017e775..f511eb2 100644 --- a/pillar.example +++ b/pillar.example @@ -85,7 +85,7 @@ nginx: # options; if it is found other options (worker_processes: 4 and so # on) are not processed and just upload the file from source worker_processes: 4 - load_module: modules/ngx_http_lua_module.so + load_module: modules/ngx_http_lua_module.so # this will be passed very first in configuration; otherwise nginx will fail to start pid: /var/run/nginx.pid ### Directory location must exist events: worker_connections: 768