8bf17d77c0
Change path in all relevant tasks to ensure that HTTP and Stream NGINX *.conf files get uploaded/created in the right directory
33 lines
967 B
YAML
33 lines
967 B
YAML
---
|
|
- name: "(Setup: Open Source NGINX) Enable Open Source NGINX Status"
|
|
blockinfile:
|
|
path: "{{ (http_template_enable) | ternary('/etc/nginx/conf.d/http/stub_status.conf','/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: "(Handler: All OSs) Reload NGINX"
|
|
|
|
- name: "(Setup: NGINX Plus) Enable NGINX Plus Status"
|
|
blockinfile:
|
|
path: "{{ (http_template_enable) | ternary('/etc/nginx/conf.d/http/status.conf','/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: "(Handler: All OSs) Reload NGINX"
|