First test deployments completed.

This commit is contained in:
Brian Lee 2023-08-14 15:30:07 -07:00
parent e5b136168c
commit ed93f7d60e
4 changed files with 40 additions and 4 deletions

View File

@ -9,6 +9,8 @@ Tested on:
## Requirements ## Requirements
Install node anyway you like, or let this role do it for you:
* [ansible-role-nodejs](https://github.com/bleetube/ansible-role-nodejs) * [ansible-role-nodejs](https://github.com/bleetube/ansible-role-nodejs)
`requirements.yml`: `requirements.yml`:
@ -37,10 +39,13 @@ This role should not be run as root.
- hosts: snort - hosts: snort
roles: roles:
- role: nginxinc.nginx_core.nginx - role: nginxinc.nginx_core.nginx
become: true become: yes
- role: bleetube.nodejs
become: yes
tags: nodejs
- role: bleetube.snort - role: bleetube.snort
tags: snort tags: snort
tasks: tasks:
- import_tasks: nginx_conf.yml - import_tasks: nginx_conf.yml
become: true become: yes
``` ```

View File

@ -1 +0,0 @@
--- # WIP

View File

@ -0,0 +1,31 @@
---
# 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

View File

@ -18,6 +18,7 @@
remote_src: yes remote_src: yes
become: yes become: yes
loop: loop:
- packages/app/build/
- packages/app/public/ - packages/app/public/
- packages/app/build/
changed_when: false