{%- from "clickhouse/map.jinja" import clickhouse with context -%} --- clickhouse-config-folder: file.directory: - name: /etc/clickhouse-server/config.d - clean: True {% for file in clickhouse.config.files %} clickhouse-config-file-{{ file }}: file.managed: - name: /etc/clickhouse-server/config.d/{{ file }}.xml - source: salt://clickhouse/templates/{{ file }}.xml.j2 - user: clickhouse - group: clickhouse - mode: 600 - template: jinja - require_in - file: clickhouse-config-folder {% endfor %}