paulbsd-salt/states/clickhouse/templates/replica.xml.j2
Paul d18a73ecc0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
updated clickhouse state
2024-03-01 17:40:19 +01:00

22 lines
634 B
Django/Jinja

{%- 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() %}
{%- if settings.replica|default(false) %}
<replica>
<host>{{ nodename }}</host>
<port>9440</port>
<user>default</user>
<password></password>
<secure>1</secure>
</replica>
{%- endif %}
{% endfor %}
</shard>
</{{ clickhouse.cluster }}>
</remote_servers>
</clickhouse>