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

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