mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Set kafka.nodes state to run first to populate kafka.nodes pillar
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,10 @@
|
|||||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
{# Run kafka/nodes.sls before Kafka is enabled, so kafka nodes pillar is setup #}
|
||||||
|
{% if grains.role in ['so-manager','so-managersearch', 'so-standalone'] %}
|
||||||
|
- kafka.nodes
|
||||||
|
{% endif %}
|
||||||
{% if GLOBALS.pipeline == "KAFKA" and KAFKAMERGED.enabled %}
|
{% if GLOBALS.pipeline == "KAFKA" and KAFKAMERGED.enabled %}
|
||||||
- kafka.enabled
|
- kafka.enabled
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
@@ -2,11 +2,10 @@
|
|||||||
# 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 'vars/globals.map.jinja' import GLOBALS %}
|
|
||||||
{% if GLOBALS.pipeline == "KAFKA" %}
|
|
||||||
{% from 'kafka/nodes.map.jinja' import COMBINED_KAFKANODES %}
|
|
||||||
|
|
||||||
{# Store kafka pillar in a file rather than memory where values could be lost. Kafka does not support nodeid's changing #}
|
{% from 'kafka/nodes.map.jinja' import COMBINED_KAFKANODES %}
|
||||||
|
|
||||||
|
{# Write Kafka pillar, so all grid members have access to nodeid of other kafka nodes and their roles #}
|
||||||
write_kafka_pillar_yaml:
|
write_kafka_pillar_yaml:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /opt/so/saltstack/local/pillar/kafka/nodes.sls
|
- name: /opt/so/saltstack/local/pillar/kafka/nodes.sls
|
||||||
@@ -15,5 +14,4 @@ write_kafka_pillar_yaml:
|
|||||||
- source: salt://kafka/files/managed_node_pillar.jinja
|
- source: salt://kafka/files/managed_node_pillar.jinja
|
||||||
- template: jinja
|
- template: jinja
|
||||||
- context:
|
- context:
|
||||||
COMBINED_KAFKANODES: {{ COMBINED_KAFKANODES }}
|
COMBINED_KAFKANODES: {{ COMBINED_KAFKANODES }}
|
||||||
{% endif %}
|
|
||||||
Reference in New Issue
Block a user