mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-01-15 12:41:32 +01:00
16 lines
804 B
Django/Jinja
16 lines
804 B
Django/Jinja
{% import_yaml 'kafka/defaults.yaml' as KAFKADEFAULTS %}
|
|
{% set KAFKAMERGED = salt['pillar.get']('kafka', KAFKADEFAULTS.kafka, merge=True) %}
|
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
|
|
|
{% do KAFKAMERGED.config.server.update({ 'node_x_id': salt['pillar.get']('kafka:nodes:' ~ GLOBALS.hostname ~ ':nodeid')}) %}
|
|
{% do KAFKAMERGED.config.server.update({'advertised_x_listeners': 'BROKER://' ~ GLOBALS.node_ip ~ ':9092'}) %}
|
|
|
|
{% set nodes = salt['pillar.get']('kafka:nodes', {}) %}
|
|
{% set combined = [] %}
|
|
{% for hostname, data in nodes.items() %}
|
|
{% do combined.append(data.nodeid ~ "@" ~ hostname ~ ":9093") %}
|
|
{% endfor %}
|
|
{% set kraft_controller_quorum_voters = ','.join(combined) %}
|
|
|
|
{% do KAFKAMERGED.config.server.update({'controller_x_quorum_x_voters': kraft_controller_quorum_voters}) %}
|