mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
add option to enable or disable to steno docker container - https://github.com/Security-Onion-Solutions/securityonion/issues/1601
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
{% set INTERFACE = salt['pillar.get']('sensor:interface', 'bond0') %}
|
{% set INTERFACE = salt['pillar.get']('sensor:interface', 'bond0') %}
|
||||||
{% set BPF_STENO = salt['pillar.get']('steno:bpf', None) %}
|
{% set BPF_STENO = salt['pillar.get']('steno:bpf', None) %}
|
||||||
{% set BPF_COMPILED = "" %}
|
{% set BPF_COMPILED = "" %}
|
||||||
{% from "pcap/map.jinja" import START with context %}
|
{% from "pcap/map.jinja" import STENOOPTIONS with context %}
|
||||||
|
|
||||||
# PCAP Section
|
# PCAP Section
|
||||||
|
|
||||||
@@ -135,9 +135,9 @@ sensoronilog:
|
|||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
|
||||||
so-steno:
|
so-steno:
|
||||||
docker_container.running:
|
docker_container.{{ STENOOPTIONS.status }}:
|
||||||
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-steno:{{ VERSION }}
|
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-steno:{{ VERSION }}
|
||||||
- start: {{ START }}
|
- start: {{ STENOOPTIONS.start }}
|
||||||
- network_mode: host
|
- network_mode: host
|
||||||
- privileged: True
|
- privileged: True
|
||||||
- port_bindings:
|
- port_bindings:
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
# don't start the docker container if it is an import node
|
{% set PCAPOPTIONS = {} %}
|
||||||
{% if grains.id.split('_')|last == 'import' %}
|
{% set ENABLED = salt['pillar.get']('steno:enabled', 'True') %}
|
||||||
{% set START = False %}
|
|
||||||
|
# don't start the docker container if it is an import node or disabled via pillar
|
||||||
|
{% if grains.id.split('_')|last == 'import' || ENABLED is sameas false %}
|
||||||
|
{% set PCAPOPTIONS['start'] = False %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set START = True %}
|
{% set PCAPOPTIONS['start'] = True %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if ENABLED is sameas false %}
|
||||||
|
{% set PCAPOPTIONS['status'] = 'stopped' %}
|
||||||
|
{% else %}
|
||||||
|
{% set PCAPOPTIONS['status'] = 'running' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
Reference in New Issue
Block a user