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