From 8f8ece2b34b4ce0924d75e22361b27d70ce6f58a Mon Sep 17 00:00:00 2001 From: reyesj2 <94730068+reyesj2@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:50:34 -0400 Subject: [PATCH] Only comment out so-kafka from so-status when it exists & only run ensure_default_pipeline when Kafka is configured Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com> --- salt/kafka/disabled.sls | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/salt/kafka/disabled.sls b/salt/kafka/disabled.sls index 4678e2602..707e953a4 100644 --- a/salt/kafka/disabled.sls +++ b/salt/kafka/disabled.sls @@ -3,6 +3,9 @@ # https://securityonion.net/license; you may not use this file except in compliance with the # Elastic License 2.0. +{% from 'kafka/map.jinja' import KAFKAMERGED %} +{% from 'vars/globals.map.jinja' import GLOBALS %} + so-kafka: docker_container.absent: - force: True @@ -11,8 +14,9 @@ so-kafka_so-status.disabled: file.comment: - name: /opt/so/conf/so-status/so-status.conf - regex: ^so-kafka$ + - onlyif: grep -q '^so-kafka$' /opt/so/conf/so-status/so-status.conf -{% if grains.role in ['so-manager','so-managersearch','so-standalone'] %} +{% if GLOBALS.is_manager and KAFKAMERGED.enabled or GLOBALS.pipeline == "KAFKA" %} ensure_default_pipeline: cmd.run: - name: |