paulbsd-salt/states/clickhouse/templates/replica.xml.j2

22 lines
634 B
Plaintext
Raw Normal View History

2023-12-04 22:35:54 +01:00
{%- from "clickhouse/map.jinja" import clickhouse with context %}
<clickhouse>
<remote_servers>
<{{ clickhouse.cluster }}>
<shard>
<internal_replication>false</internal_replication>
{% for nodename, settings in clickhouse.clusters[clickhouse.cluster].nodes.items() %}
2024-03-01 17:40:19 +01:00
{%- if settings.replica|default(false) %}
2023-12-04 22:35:54 +01:00
<replica>
<host>{{ nodename }}</host>
<port>9440</port>
<user>default</user>
<password></password>
<secure>1</secure>
</replica>
2024-03-01 17:40:19 +01:00
{%- endif %}
2023-12-04 22:35:54 +01:00
{% endfor %}
</shard>
</{{ clickhouse.cluster }}>
</remote_servers>
</clickhouse>