27 lines
967 B
Django/Jinja
27 lines
967 B
Django/Jinja
{%- from "clickhouse/map.jinja" import clickhouse with context -%}
|
|
<clickhouse>
|
|
<users>
|
|
<{{ name }}>
|
|
{%- if params.networks|default(None) %}
|
|
<networks>
|
|
{%- for network in params.networks|default(["127.0.0.1/8"]) %}
|
|
<ip>{{ network }}</ip>
|
|
{%- endfor %}
|
|
</networks>
|
|
{%- endif %}
|
|
<profile>{{ params.profile|default("default") }}</profile>
|
|
<quota>{{ params.quota|default("default") }}</quota>
|
|
<default_database>{{ params.default_database|default("default") }}</default_database>
|
|
<access_management>{{ params.access_management|default(0)}}</access_management>
|
|
{%- if params.databases|default([])|length > 0 %}
|
|
<allow_databases>
|
|
{%- for database in params.databases|default([]) %}
|
|
<database>{{ database }}</database>
|
|
{%- endfor %}
|
|
</allow_databases>
|
|
{%- endif %}
|
|
<password>{{ params.password|default("") }}</password>
|
|
</{{ name }}>
|
|
</users>
|
|
</clickhouse>
|