paulbsd-salt/states/clickhouse/users.sls
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

20 lines
532 B
Plaintext

---
{%- from "clickhouse/map.jinja" import clickhouse with context %}
clickhouse-users-folder:
file.directory:
- name: /etc/clickhouse-server/users.d
{% 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 %}