From 902d4ff83f8b6485a7900a16302ffa690a455e97 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Wed, 24 Jun 2020 12:19:09 +0200 Subject: [PATCH] Add PID templating option (#267) --- defaults/main/template.yml | 1 + molecule/common/playbook_template.yml | 1 + templates/nginx.conf.j2 | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults/main/template.yml b/defaults/main/template.yml index da8a8b4..868d6e2 100644 --- a/defaults/main/template.yml +++ b/defaults/main/template.yml @@ -18,6 +18,7 @@ nginx_main_template: user: nginx worker_processes: auto # worker_rlimit_nofile: 1024 + pid: /var/run/nginx.pid error_log: location: /var/log/nginx/error.log level: warn diff --git a/molecule/common/playbook_template.yml b/molecule/common/playbook_template.yml index 1803268..5c5000b 100644 --- a/molecule/common/playbook_template.yml +++ b/molecule/common/playbook_template.yml @@ -13,6 +13,7 @@ conf_file_location: /etc/nginx/ user: nginx worker_processes: auto + pid: /var/run/nginx.pid error_log: location: /var/log/nginx/error.log level: warn diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 48b00ef..3a14d34 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -45,7 +45,7 @@ worker_rlimit_nofile {{ nginx_main_template.worker_rlimit_nofile }}; {% endif %} error_log {{ nginx_main_template.error_log.location }} {{ nginx_main_template.error_log.level }}; -pid /var/run/nginx.pid; +pid {{ nginx_main_template.pid }}; events {