{% for repo, args in salt['pillar.get']('repositories', {}).items() %} Add {{ repo }} repository: pkgrepo.managed: - name: {{ repo }} - humanname: {{ args['humanname'] }} - baseurl: {{ args['baseurl'] }} - enabled: {{ args['enabled'] }} - gpgautoimport: {{ args['gpgautoimport'] }} - refresh: {{ args['refresh'] }} {% endfor %}