Suricata bpf cleanup

This commit is contained in:
Josh Brower
2020-01-28 16:12:46 -05:00
parent 8204ffdd05
commit f536e89064

View File

@@ -18,7 +18,6 @@
{% set VERSION = salt['pillar.get']('static:soversion', 'HH1.1.4') %} {% set VERSION = salt['pillar.get']('static:soversion', 'HH1.1.4') %}
{% set MASTER = salt['grains.get']('master') %} {% set MASTER = salt['grains.get']('master') %}
{% set BPF_NIDS = salt['pillar.get']('nids:bpf') %} {% set BPF_NIDS = salt['pillar.get']('nids:bpf') %}
{% set BPF_STATUS = 0 %}
# Suricata # Suricata
@@ -86,9 +85,7 @@ surithresholding:
# BPF compilation and configuration # BPF compilation and configuration
{% if BPF_NIDS %} {% if BPF_NIDS %}
{% set BPF_CALC = salt['cmd.script']('/usr/sbin/so-bpf-compile', interface + ' ' + BPF_NIDS|join(" ") ) %} {% set BPF_CALC = salt['cmd.script']('/usr/sbin/so-bpf-compile', interface + ' ' + BPF_NIDS|join(" ") ) %}
{% if BPF_CALC['stderr'] == "" %} {% if BPF_CALC['stderr'] != "" %}
{% set BPF_STATUS = 1 %}
{% else %}
suribpfcompilationfailure: suribpfcompilationfailure:
test.configurable_test_state: test.configurable_test_state:
- changes: False - changes: False
@@ -102,7 +99,7 @@ suribpf:
- name: /opt/so/conf/suricata/bpf - name: /opt/so/conf/suricata/bpf
- user: 940 - user: 940
- group: 940 - group: 940
{% if BPF_STATUS %} {% if BPF_CALC['stderr'] == "" %}
- contents_pillar: nids:bpf - contents_pillar: nids:bpf
{% else %} {% else %}
- contents: - contents: