add so-manager to kafka.nodes pillar

This commit is contained in:
m0duspwnens
2024-04-03 08:52:26 -04:00
parent 4e142e0212
commit 639bf05081
3 changed files with 8 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
{% set current_kafkanodes = salt.saltutil.runner('mine.get', tgt='G@role:so-kafkanode', fun='network.ip_addrs', tgt_type='compound') %}
{% set current_kafkanodes = salt.saltutil.runner('mine.get', tgt='G@role:so-kafkanode or G@role:so-manager', fun='network.ip_addrs', tgt_type='compound') %}
{% set pillar_kafkanodes = salt['pillar.get']('kafka:nodes', default={}, merge=True) %}
{% set existing_ids = [] %}
@@ -27,4 +27,4 @@
{% endfor %}
kafka:
nodes: {{ final_nodes|tojson }}
nodes: {{ final_nodes|tojson }}

View File

@@ -63,6 +63,8 @@ kafka_sbin_jinja_tools:
- group: 960
- file_mode: 755
- template: jinja
- defaults:
GLOBALS: {{ GLOBALS }}
kakfa_log_dir:
file.directory:
@@ -79,12 +81,9 @@ kafka_data_dir:
- makedirs: True
kafka_keystore_script:
cmd.script:
- source: salt://kafka/tools/sbin_jinja/so-kafka-generate-keystore
- template: jinja
cmd.run:
- name: /usr/sbin/so-kafka-generate-keystore
- cwd: /opt/so
- defaults:
GLOBALS: {{ GLOBALS }}
kafka_kraft_server_properties:
file.managed:
@@ -106,4 +105,4 @@ kafka_kraft_server_properties:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}
{% endif %}

View File

@@ -13,4 +13,4 @@ if [ ! -f /etc/pki/kafka.jks ]; then
docker rm so-kafka-keystore
else
exit 0
fi
fi