ansible-role-snort/docs/examples/nginx_conf.yml

31 lines
1.2 KiB
YAML

---
# https://github.com/v0l/snort/blob/main/docker/nginx.conf
- name: snort | Configure nginx
ansible.builtin.import_role:
name: nginx_core.nginx_config
vars:
nginx_config_http_template_enable: true
nginx_config_http_template:
- template_file: http/default.conf.j2
deployment_location: "/etc/nginx/conf.d/snort_{{ nginx_snort_domain|default(inventory_hostname) }}.conf"
backup: false
config:
servers:
- core:
listen:
- address: "{{ default_interface_ipv4_address|default(ansible_default_ipv4.address) }}:{{ nginx_snort_port|default(4451) }} ssl"
include:
- "/etc/nginx/acme_{{ nginx_snort_domain|default(inventory_hostname) }}.conf"
index: index.html
root: "{{ snort_root_path|default('/var/www/snort') }}"
log:
access:
- off
http2:
enabled: yes
locations:
- location: /
core:
try_files:
files: $uri $uri/ /index.html
code: =404