paulbsd-salt/states/clickhouse/users.sls

16 lines
444 B
Plaintext
Raw Normal View History

2023-12-04 22:35:54 +01:00
---
{%- from "clickhouse/map.jinja" import clickhouse with context %}
{% for user, params in clickhouse.users.items() %}
clickhouse-user-{{ user }}:
file.managed:
- name: /etc/clickhouse-server/users.d/{{ user }}.xml
- source: salt://clickhouse/templates/user.xml.j2
- user: clickhouse
- group: clickhouse
- mode: 600
- template: jinja
- context:
name: {{ user }}
params: {{ params }}
{% endfor %}