mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
dont constantly run steno or suricata containers for import node
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
{% set INTERFACE = salt['pillar.get']('sensor:interface', 'bond0') %}
|
||||
{% set BPF_STENO = salt['pillar.get']('steno:bpf', None) %}
|
||||
{% set BPF_COMPILED = "" %}
|
||||
{% from "pcap/map.jinja" import START with context %}
|
||||
|
||||
# PCAP Section
|
||||
|
||||
@@ -131,6 +132,7 @@ sensoronilog:
|
||||
so-steno:
|
||||
docker_container.running:
|
||||
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-steno:{{ VERSION }}
|
||||
- start: {{ START }}
|
||||
- network_mode: host
|
||||
- privileged: True
|
||||
- port_bindings:
|
||||
|
||||
6
salt/pcap/map.jinja
Normal file
6
salt/pcap/map.jinja
Normal file
@@ -0,0 +1,6 @@
|
||||
# don't start the docker container if it is an import node
|
||||
{% if grains.id.split('_')|last == 'import' %}
|
||||
{% set START = False %}
|
||||
{% else %}
|
||||
{% set START = True %}
|
||||
{% endif %}
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
{# import_yaml 'suricata/files/defaults2.yaml' as suricata #}
|
||||
{% from 'suricata/suricata_config.map.jinja' import suricata_defaults as suricata_config with context %}
|
||||
{% from "suricata/map.jinja" import START with context %}
|
||||
|
||||
# Suricata
|
||||
|
||||
@@ -134,6 +135,7 @@ suribpf:
|
||||
so-suricata:
|
||||
docker_container.running:
|
||||
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-suricata:{{ VERSION }}
|
||||
- start: {{ START }}
|
||||
- privileged: True
|
||||
- environment:
|
||||
- INTERFACE={{ interface }}
|
||||
|
||||
6
salt/suricata/map.jinja
Normal file
6
salt/suricata/map.jinja
Normal file
@@ -0,0 +1,6 @@
|
||||
# don't start the docker container if it is an import node
|
||||
{% if grains.id.split('_')|last == 'import' %}
|
||||
{% set START = False %}
|
||||
{% else %}
|
||||
{% set START = True %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user