From bd5fe4328561017b87d78493867d1f410e83ffc1 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 9 Apr 2024 11:07:53 -0400 Subject: [PATCH] jinja config files --- salt/kafka/config.map.jinja | 8 -------- salt/kafka/config.sls | 9 --------- salt/kafka/etc/client.properties.jinja | 4 ++-- salt/kafka/etc/server.properties.jinja | 4 ++-- 4 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 salt/kafka/config.map.jinja diff --git a/salt/kafka/config.map.jinja b/salt/kafka/config.map.jinja deleted file mode 100644 index 33f9f8387..000000000 --- a/salt/kafka/config.map.jinja +++ /dev/null @@ -1,8 +0,0 @@ -{% from 'vars/globals.map.jinja' import GLOBALS %} -{% from 'kafka/map.jinja' import KAFKAMERGED %} - -{% set KAFKACONFIG = {} %} -{% for k, v in KAFKAMERGED.config.items() %} -{% do KAFKACONFIG.update({k | replace("_x_", "."): v}) %} -{% endfor %} - diff --git a/salt/kafka/config.sls b/salt/kafka/config.sls index 1666e65ae..c856c4f80 100644 --- a/salt/kafka/config.sls +++ b/salt/kafka/config.sls @@ -10,16 +10,8 @@ {% set kafka_ips_logstash = [] %} {% set kafka_ips_kraft = [] %} {% set kafkanodes = salt['pillar.get']('kafka:nodes', {}) %} -{% set kafka_nodeid = salt['pillar.get']('kafka:nodes:' ~ GLOBALS.hostname ~ ':nodeid') %} {% set kafka_ip = GLOBALS.node_ip %} -{% 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) %} - {# Create list for kafka <-> logstash/searchnode communcations #} {% for node, node_data in kafkanodes.items() %} {% do kafka_ips_logstash.append(node_data['ip'] + ":9092") %} @@ -32,7 +24,6 @@ {% endfor %} {% set kraft_server_list = "','".join(kafka_ips_kraft) %} - include: - ssl diff --git a/salt/kafka/etc/client.properties.jinja b/salt/kafka/etc/client.properties.jinja index 1353ac491..0245c3c42 100644 --- a/salt/kafka/etc/client.properties.jinja +++ b/salt/kafka/etc/client.properties.jinja @@ -1,2 +1,2 @@ -{% from 'kafka/config.map.jinja' import KAFKACONFIG -%} -{{ KAFKACONFIG.client | yaml(False) }} +{% from 'kafka/map.jinja' import KAFKAMERGED -%} +{{ KAFKAMERGED.config.client | yaml(False) | replace("_x_", ".") }} diff --git a/salt/kafka/etc/server.properties.jinja b/salt/kafka/etc/server.properties.jinja index b02730faa..90a80063f 100644 --- a/salt/kafka/etc/server.properties.jinja +++ b/salt/kafka/etc/server.properties.jinja @@ -1,2 +1,2 @@ -{% from 'kafka/config.map.jinja' import KAFKACONFIG -%} -{{ KAFKACONFIG.server | yaml(False) }} +{% from 'kafka/map.jinja' import KAFKAMERGED -%} +{{ KAFKAMERGED.config.server | yaml(False) | replace("_x_", ".") }}