top and allow_states changes for playbook

This commit is contained in:
m0duspwnens
2023-05-08 14:12:46 -04:00
parent d5c7eec4ef
commit ef18cb3704
4 changed files with 5 additions and 8 deletions

View File

@@ -3,7 +3,6 @@
# https://securityonion.net/license; you may not use this file except in compliance with the # https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0. # Elastic License 2.0.
{% set PLAYBOOK = salt['pillar.get']('manager:playbook', '0') %}
{% set ELASTALERT = salt['pillar.get']('elastalert:enabled', True) %} {% set ELASTALERT = salt['pillar.get']('elastalert:enabled', True) %}
{% set ELASTICSEARCH = salt['pillar.get']('elasticsearch:enabled', True) %} {% set ELASTICSEARCH = salt['pillar.get']('elasticsearch:enabled', True) %}
{% set KIBANA = salt['pillar.get']('kibana:enabled', True) %} {% set KIBANA = salt['pillar.get']('kibana:enabled', True) %}
@@ -215,7 +214,7 @@
], ],
}, grain='role') %} }, grain='role') %}
{% if (PLAYBOOK != 0) and grains.role in ['so-eval', 'so-manager', 'so-managersearch', 'so-standalone'] %} {% if grains.role in ['so-eval', 'so-manager', 'so-managersearch', 'so-standalone'] %}
{% do allowed_states.append('mysql') %} {% do allowed_states.append('mysql') %}
{% endif %} {% endif %}
@@ -248,11 +247,11 @@
{% do allowed_states.append('elastalert') %} {% do allowed_states.append('elastalert') %}
{% endif %} {% endif %}
{% if (PLAYBOOK !=0) and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %} {% if grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch'] %}
{% do allowed_states.append('playbook') %} {% do allowed_states.append('playbook') %}
{% endif %} {% endif %}
{% if (PLAYBOOK !=0) and grains.role in ['so-eval'] %} {% if (REDIS !=0) and grains.role in ['so-eval'] %}
{% do allowed_states.append('redis') %} {% do allowed_states.append('redis') %}
{% endif %} {% endif %}

View File

@@ -1,2 +1,2 @@
playbook: playbook:
enabled: True enabled: False

View File

@@ -23,7 +23,6 @@ so-playbook-sync_cron:
- identifier: so-playbook-sync_cron - identifier: so-playbook-sync_cron
- user: root - user: root
so-playbook-ruleupdate_cron: so-playbook-ruleupdate_cron:
cron.absent: cron.absent:
- identifier: so-playbook-ruleupdate_cron - identifier: so-playbook-ruleupdate_cron

View File

@@ -3,7 +3,6 @@
# https://securityonion.net/license; you may not use this file except in compliance with the # https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0. # Elastic License 2.0.
{% set PLAYBOOK = salt['pillar.get']('manager:playbook', '0') %}
{% set ELASTALERT = salt['pillar.get']('elastalert:enabled', True) %} {% set ELASTALERT = salt['pillar.get']('elastalert:enabled', True) %}
{% set ELASTICSEARCH = salt['pillar.get']('elasticsearch:enabled', True) %} {% set ELASTICSEARCH = salt['pillar.get']('elasticsearch:enabled', True) %}
{% set KIBANA = salt['pillar.get']('kibana:enabled', True) %} {% set KIBANA = salt['pillar.get']('kibana:enabled', True) %}
@@ -95,8 +94,8 @@ base:
{%- endif %} {%- endif %}
- utility - utility
- soctopus - soctopus
{%- if PLAYBOOK != 0 %}
- playbook - playbook
{%- if REDIS != 0 %}
- redis - redis
{%- endif %} {%- endif %}
- elasticfleet - elasticfleet