--- {%- from "logrotate/map.jinja" import logrotate with context %} {%- for filename, cfg in logrotate.config.items() %} logrotate-config-{{ filename }}: file.managed: - name: /etc/logrotate.d/{{ filename }} - source: salt://logrotate/templates/config.j2 - user: root - group: root - template: jinja - context: cfg: {{ cfg }} {%- endfor %}