--- {%- from "haproxy/map.jinja" import haproxy with context %} haproxy-pkg: pkg.installed: - pkgs: {{ haproxy.packages }} haproxy-script-dir: file.directory: - name: {{ haproxy.config.dir }}/scripts - user: {{ haproxy.config.user }} - group: {{ haproxy.config.group }} - mode: "0700" {% for filename in haproxy.scripts %} haprox-script-{{ filename }}: file.managed: - name: {{ haproxy.config.dir }}/scripts/{{ filename }} - source: salt://haproxy/scripts/{{ filename }} - user: {{ haproxy.config.user }} - group: {{ haproxy.config.group }} - mode: "0700" - watch_in: - service: haproxy-service {% endfor %}