add config validation
This commit is contained in:
parent
058e44e57c
commit
f9a73e6b23
@ -1,6 +1,7 @@
|
||||
---
|
||||
nginx_user: nginx
|
||||
nginx_group: nginx
|
||||
nginx_worker_processes: 1
|
||||
nginx_open_ports:
|
||||
- 80
|
||||
- 443
|
||||
|
@ -57,6 +57,7 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0640
|
||||
validate: /sbin/nginx -t -c %s
|
||||
notify:
|
||||
- nginx_reload
|
||||
|
||||
@ -67,6 +68,7 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0640
|
||||
validate: bash -c 'nginx -t -c /dev/stdin <<< "events {worker_connections 1;} http { include %s; }"'
|
||||
with_items:
|
||||
- header.conf
|
||||
- tls.conf
|
||||
|
@ -1,6 +1,6 @@
|
||||
# {{ ansible_managed }}
|
||||
user {{ nginx_user }} {{ nginx_group }};
|
||||
worker_processes 1;
|
||||
worker_processes {{ nginx_worker_processes }};
|
||||
|
||||
error_log /var/log/nginx/error.log;
|
||||
pid /run/nginx.pid;
|
||||
|
Loading…
Reference in New Issue
Block a user