Go to file
2023-10-14 13:40:20 -07:00
defaults Provide service unit and fix up permissions. Leaving repo in a broken, but still helpful state for now. 2023-10-14 13:40:20 -07:00
docs/examples First test deployments completed. 2023-08-14 15:30:07 -07:00
handlers Provide service unit and fix up permissions. Leaving repo in a broken, but still helpful state for now. 2023-10-14 13:40:20 -07:00
meta Appease ansible-galaxy. 2023-08-16 19:08:05 -07:00
tasks Provide service unit and fix up permissions. Leaving repo in a broken, but still helpful state for now. 2023-10-14 13:40:20 -07:00
templates Provide service unit and fix up permissions. Leaving repo in a broken, but still helpful state for now. 2023-10-14 13:40:20 -07:00
tests Initialize repository for Snort role. 2023-08-14 14:37:34 -07:00
.gitignore Initialize repository for Snort role. 2023-08-14 14:37:34 -07:00
LICENSE Initialize repository for Snort role. 2023-08-14 14:37:34 -07:00
README.md Provide service unit and fix up permissions. Leaving repo in a broken, but still helpful state for now. 2023-10-14 13:40:20 -07:00

Ansible Role: snort

This Ansible Role builds and installs snort. It is intended to be composed with a separate role for the web proxy configuration.

Warning: This role is incomplete. Yarn seems problematic to run via Ansible. The build step must be done manually. After running this role and the nginx configuration, the manual steps are as follows:

systemctl stop snort
cd /var/www/snort
doas -u snort yarn
doas -u snort yarn build
doas -u snort yarn workspace @snort/app intl-extract
doas -u snort yarn workspace @snort/app intl-compile
systemctl start snort

Tested on:

  • Archlinux
  • Ubuntu 22.04

Requirements

  • nodejs - version 20 is fine,
  • yarn

You can use ansible-role-nodejs if you want to. Here is an example requirements.yml for that:

roles:
  - src: https://github.com/bleetube/ansible-role-nodejs
    name: bleetube.nodejs

It will set up node, npm, yarn, and n using the nodesource Debian repositories. But you can also install those by any other method.

Dependencies

Any similarly configured web proxy may suffice.

Role Variables

See the role defaults. For a working example, see this homelab stack.

Example Playbook

- hosts: snort
  become: yes
  roles:
    - role: nginxinc.nginx_core.nginx
    - role: bleetube.nodejs
      tags: nodejs
    - role: bleetube.snort
      tags: snort
  tasks:
    - import_tasks: nginx_conf.yml