{% from tpldir+"/map.jinja" import nginx with context %} {% set profiles = salt.pillar.get("nginx:profiles", []) %} nginx_pkg: pkg.installed: - pkgs: - nginx - certbot - certbot-nginx {% for profile in profiles %} nginx_{{ profile }}_test: cmd.run: - name: echo "{{ profile }}" {% endfor %}