--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
users:
john:1000
smith:1001
salt salt # salt '*' pillar.items |grep -A 5 users
users:
john:1000 smith:1001
salt salt #
Now, if you add a space after " : ", you will get a dictionary :
salt salt # salt '*' pillar.items |grep -A 5 users
users:
----------
john:
1000
smith:
1001
salt salt #
And your code should work after it's rendered as a dictionary :
{% for user, uid in pillar.get('users', {}).items() %}
{{user}}:
user.present:
- uid: {{uid}}
{% endfor %}
Hope this helps