{% for pkg in salt['pillar.get']('packages', []) %} Install {{ pkg }}: pkg.installed: - name: {{ pkg }} - refresh: false {% endfor %}