Change Curator disable config

This commit is contained in:
Wes
2023-12-20 18:26:27 +00:00
parent cd661027a6
commit 1006710226
2 changed files with 4 additions and 21 deletions

View File

@@ -219,10 +219,6 @@
{% do allowed_states.append('kibana.secrets') %} {% do allowed_states.append('kibana.secrets') %}
{% endif %} {% endif %}
{% if grains.role in ['so-eval', 'so-standalone', 'so-managersearch', 'so-heavynode', 'so-manager'] %}
{% do allowed_states.append('curator.disabled') %}
{% endif %}
{% if 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('elastalert') %} {% do allowed_states.append('elastalert') %}
{% endif %} {% endif %}

View File

@@ -1,14 +1,8 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one # Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at # or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# 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.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
include:
- curator.sostatus
so-curator: so-curator:
docker_container.absent: docker_container.absent:
- force: True - force: True
@@ -16,7 +10,7 @@ so-curator:
so-curator_so-status.disabled: so-curator_so-status.disabled:
file.line: file.line:
- name: /opt/so/conf/so-status/so-status.conf - name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-curator$ - match: ^so-curator$
- mode: delete - mode: delete
so-curator-cluster-close: so-curator-cluster-close:
@@ -32,14 +26,7 @@ delete_curator_configuration:
- name: /opt/so/conf/curator - name: /opt/so/conf/curator
- recurse: True - recurse: True
{% set files = salt.file.find(path='/usr/sbin', name='so-curator*') %}
delete_curator_scripts: delete_curator_scripts:
file.absent: file.absent:
- name: /usr/sbin/so-curator-* - names: {{files|yaml}}
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}