--- {%- from "rspamd/map.jinja" import rspamd with context %} {%- for configfile in rspamd.config.files.items() %} rspamd-config-{{ configfile }}: file.managed: - name: {{ rspamd.config.dir }}/{{ configfile }} - source: salt://rspamd/templates/config.j2 - template: jinja - user: root - group: root - watch_in: - service: rspamd-service {%- endfor %}