refresh salt fileserver if suricata rule symlink is created

This commit is contained in:
m0duspwnens
2020-05-28 12:00:22 -04:00
parent 091cc8b789
commit 4f15de8b77
4 changed files with 24 additions and 12 deletions

View File

@@ -0,0 +1,3 @@
refresh_salt_master_fileserver:
saltmod.runner:
- name: fileserver.update

View File

@@ -55,18 +55,6 @@ surilogdir:
- user: 940 - user: 940
- group: 939 - group: 939
surilocaldir:
file.directory:
- name: /opt/so/saltstack/local/salt/suricata
- user: 940
- group: 940
- makedirs: True
ruleslink:
file.symlink:
- name: /opt/so/saltstack/local/salt/suricata/rules
- target: /opt/so/rules/nids
suridatadir: suridatadir:
file.directory: file.directory:
- name: /nsm/suricata - name: /nsm/suricata

17
salt/suricata/master.sls Normal file
View File

@@ -0,0 +1,17 @@
include:
- salt.master.refresh_fileserver
surilocaldir:
file.directory:
- name: /opt/so/saltstack/local/salt/suricata
- user: 940
- group: 940
- makedirs: True
ruleslink:
file.symlink:
- name: /opt/so/saltstack/local/salt/suricata/rules
- target: /opt/so/rules/nids
- watch_in:
- saltmod: refresh_salt_master_fileserver

View File

@@ -30,6 +30,7 @@ base:
- telegraf - telegraf
- firewall - firewall
- idstools - idstools
- suricata.master
- pcap - pcap
- suricata - suricata
- zeek - zeek
@@ -73,6 +74,7 @@ base:
- soc - soc
- firewall - firewall
- idstools - idstools
- suricata.master
- healthcheck - healthcheck
{%- if FLEETMASTER or FLEETNODE or PLAYBOOK != 0 %} {%- if FLEETMASTER or FLEETNODE or PLAYBOOK != 0 %}
- mysql - mysql
@@ -129,6 +131,7 @@ base:
- firewall - firewall
- master - master
- idstools - idstools
- suricata.master
- redis - redis
{%- if FLEETMASTER or FLEETNODE or PLAYBOOK != 0 %} {%- if FLEETMASTER or FLEETNODE or PLAYBOOK != 0 %}
- mysql - mysql
@@ -174,6 +177,7 @@ base:
- soc - soc
- firewall - firewall
- idstools - idstools
- suricata.master
- healthcheck - healthcheck
- redis - redis
{%- if FLEETMASTER or FLEETNODE or PLAYBOOK != 0 %} {%- if FLEETMASTER or FLEETNODE or PLAYBOOK != 0 %}