2018-01-10 23:40:01 +01:00
|
|
|
---
|
2018-01-26 20:00:26 +01:00
|
|
|
- name: "(Setup: Open Source NGINX) Enable Open Source NGINX Status"
|
2018-01-10 23:40:01 +01:00
|
|
|
blockinfile:
|
|
|
|
path: /etc/nginx/conf.d/stub_status.conf
|
|
|
|
create: yes
|
|
|
|
block: |
|
|
|
|
server {
|
2018-01-19 19:27:47 +01:00
|
|
|
listen 127.0.0.1:80;
|
|
|
|
location /nginx_status {
|
|
|
|
stub_status on;
|
|
|
|
allow 127.0.0.1;
|
|
|
|
deny all;
|
|
|
|
}
|
2018-01-10 23:40:01 +01:00
|
|
|
}
|
|
|
|
when: type == "opensource"
|
2018-01-26 20:00:26 +01:00
|
|
|
notify: "(Handler: All OSs) Reload NGINX"
|
2018-01-10 23:40:01 +01:00
|
|
|
|
2018-01-26 20:00:26 +01:00
|
|
|
- name: "(Setup: NGINX Plus) Enable NGINX Plus Status"
|
2018-01-10 23:40:01 +01:00
|
|
|
blockinfile:
|
|
|
|
path: /etc/nginx/conf.d/status.conf
|
|
|
|
create: yes
|
|
|
|
block: |
|
|
|
|
server {
|
2018-01-19 19:27:47 +01:00
|
|
|
listen 127.0.0.1:80;
|
|
|
|
location /status {
|
|
|
|
status;
|
|
|
|
allow 127.0.0.1;
|
|
|
|
deny all;
|
|
|
|
}
|
2018-01-10 23:40:01 +01:00
|
|
|
}
|
|
|
|
when: type == "plus"
|
2018-01-26 20:00:26 +01:00
|
|
|
notify: "(Handler: All OSs) Reload NGINX"
|