ansible-role-nginx/tasks/conf/setup-status.yml
Alessandro Fael Garcia 78a7e3efeb Multiple changes
* Add option to enable REST API
* Add option to enable live dashboard
* Add option to install WAF module
* Load modules in nginx.conf
* Improve version check for RedHat distros
2018-01-19 10:27:47 -08:00

33 lines
755 B
YAML

---
- name: "(All OSs) Enable Open Source NGINX Status"
blockinfile:
path: /etc/nginx/conf.d/stub_status.conf
create: yes
block: |
server {
listen 127.0.0.1:80;
location /nginx_status {
stub_status on;
allow 127.0.0.1;
deny all;
}
}
when: type == "opensource"
notify: "(All OSs) Reload NGINX"
- name: "(All OSs) Enable NGINX Plus Status"
blockinfile:
path: /etc/nginx/conf.d/status.conf
create: yes
block: |
server {
listen 127.0.0.1:80;
location /status {
status;
allow 127.0.0.1;
deny all;
}
}
when: type == "plus"
notify: "(All OSs) Reload NGINX"