mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
on fresh install kafka nodes pillar may not have populated. Avoiding this by only generating kafka input pipeline when kafka nodes pillar is not empty
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
{%- set kafka_password = salt['pillar.get']('kafka:password') %}
|
{%- set kafka_password = salt['pillar.get']('kafka:password') %}
|
||||||
{%- set kafka_brokers = salt['pillar.get']('kafka:nodes', {}) %}
|
{%- set kafka_brokers = salt['pillar.get']('kafka:nodes', default=None) %}
|
||||||
{%- set brokers = [] %}
|
{%- set brokers = [] %}
|
||||||
|
|
||||||
|
{%- if kafka_brokers != none %}
|
||||||
{%- for key, values in kafka_brokers.items() %}
|
{%- for key, values in kafka_brokers.items() %}
|
||||||
{%- if 'broker' in values['role'] %}
|
{%- if 'broker' in values['role'] %}
|
||||||
{%- do brokers.append(key ~ ':9092') %}
|
{%- do brokers.append(key ~ ':9092') %}
|
||||||
@@ -34,3 +35,4 @@ filter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{% endif %}
|
||||||
Reference in New Issue
Block a user