From 643d4831c10b09714021ae97e19e0ea679433b94 Mon Sep 17 00:00:00 2001 From: reyesj2 <94730068+reyesj2@users.noreply.github.com> Date: Tue, 2 Apr 2024 16:35:14 -0400 Subject: [PATCH] CRLF -> LF Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com> --- salt/kafka/init.sls | 18 +++++----- salt/kafka/sostatus.sls | 40 ++++++++++----------- salt/manager/tools/sbin/so-kafka-clusterid | 42 +++++++++++----------- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/salt/kafka/init.sls b/salt/kafka/init.sls index 653cd4b88..903c66867 100644 --- a/salt/kafka/init.sls +++ b/salt/kafka/init.sls @@ -1,9 +1,9 @@ -# 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 -# https://securityonion.net/license; you may not use this file except in compliance with the -# Elastic License 2.0. - -{# Create map.jinja to enable / disable kafka from UI #} -{# Temporarily just enable kafka #} -include: - - kafka.enabled +# 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 +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + +{# Create map.jinja to enable / disable kafka from UI #} +{# Temporarily just enable kafka #} +include: + - kafka.enabled diff --git a/salt/kafka/sostatus.sls b/salt/kafka/sostatus.sls index 4c7519964..37c868a46 100644 --- a/salt/kafka/sostatus.sls +++ b/salt/kafka/sostatus.sls @@ -1,21 +1,21 @@ -# 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 -# https://securityonion.net/license; you may not use this file except in compliance with the -# Elastic License 2.0. - -{% from 'allowed_states.map.jinja' import allowed_states %} -{% if sls.split('.')[0] in allowed_states %} - -append_so-kafka_so-status.conf: - file.append: - - name: /opt/so/conf/so-status/so-status.conf - - text: so-kafka - - unless: grep -q so-kafka /opt/so/conf/so-status/so-status.conf - -{% else %} - -{{sls}}_state_not_allowed: - test.fail_without_changes: - - name: {{sls}}_state_not_allowed - +# 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 +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + +{% from 'allowed_states.map.jinja' import allowed_states %} +{% if sls.split('.')[0] in allowed_states %} + +append_so-kafka_so-status.conf: + file.append: + - name: /opt/so/conf/so-status/so-status.conf + - text: so-kafka + - unless: grep -q so-kafka /opt/so/conf/so-status/so-status.conf + +{% else %} + +{{sls}}_state_not_allowed: + test.fail_without_changes: + - name: {{sls}}_state_not_allowed + {% endif %} \ No newline at end of file diff --git a/salt/manager/tools/sbin/so-kafka-clusterid b/salt/manager/tools/sbin/so-kafka-clusterid index 64833a0d2..719973247 100644 --- a/salt/manager/tools/sbin/so-kafka-clusterid +++ b/salt/manager/tools/sbin/so-kafka-clusterid @@ -1,22 +1,22 @@ -#!/bin/bash - -# 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 -# https://securityonion.net/license; you may not use this file except in compliance with the -# Elastic License 2.0. - -local_salt_dir=/opt/so/saltstack/local - -if [[ -f /usr/sbin/so-common ]]; then - source /usr/sbin/so-common -else - source $(dirname $0)/../../../common/tools/sbin/so-common -fi - -if ! grep -q "^ kafka_cluster_id:" $local_salt_dir/pillar/secrets.sls; then - kafka_cluster_id=$(get_random_value 22) - echo ' kafka_cluster_id: '$kafka_cluster_id >> $local_salt_dir/pillar/secrets.sls -else - echo 'kafka_cluster_id exists' - salt-call pillar.get secrets +#!/bin/bash + +# 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 +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + +local_salt_dir=/opt/so/saltstack/local + +if [[ -f /usr/sbin/so-common ]]; then + source /usr/sbin/so-common +else + source $(dirname $0)/../../../common/tools/sbin/so-common +fi + +if ! grep -q "^ kafka_cluster_id:" $local_salt_dir/pillar/secrets.sls; then + kafka_cluster_id=$(get_random_value 22) + echo ' kafka_cluster_id: '$kafka_cluster_id >> $local_salt_dir/pillar/secrets.sls +else + echo 'kafka_cluster_id exists' + salt-call pillar.get secrets fi \ No newline at end of file