I imagine many people have a template file in jinja that looks a bit like this:
{% for id, site in salt['pillar.get']('haproxy:sites').items() %}
Now I'm finding that changes to the pillar will sometimes cause a larger than necessary diff. That takes more time to verify and mistakes can happen because its harder to verify the output.
So I'd like to sort the dict in the for loop. I don't care too much what I sort by; perhaps the id or even an attribute in the site object. Now I don't really need a dict and could do with just a simple list rooted in the id, but that's what salt is giving me.
Is there a good way to do this?
Cheers
Ari