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 {