The jinja2 templates documentation contains multiple examples of looping over dictionaries:
http://jinja.pocoo.org/docs/dev/templates/#for Using '.iteritems()', or '.items()' as well as using the '|dictsort' filter On Fri, Nov 13, 2015 at 9:49 AM, Hristo Stoyanov <[email protected]> wrote: > I saw those, but they do not apply to jinja2 templates. > > /Hristo Stoyanov > On Nov 12, 2015 10:45 PM, "Alex Leonhardt" <[email protected]> > wrote: > >> Hi, >> >> this may help: >> >> https://docs.ansible.com/ansible/playbooks_loops.html#looping-over-subelements >> https://docs.ansible.com/ansible/playbooks_loops.html#looping-over-hashes >> >> Alex >> >> >> On 13 November 2015 at 05:26, Hristo Stoyanov <[email protected]> >> wrote: >> >>> Sorry if this has been documented elsewhere (where?), but how can one >>> iterate with jinja2 over a dictionary? >>> >>> >>> http://stackoverflow.com/questions/33666820/ansible-jinja2-loops-over-complex-structures >>> >>> You can ask here or in stackoverflow. >>> >>> Thanks >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Ansible Project" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/ansible-project/28bc59f9-ff76-4c65-b6cc-44521f53cc03%40googlegroups.com >>> <https://groups.google.com/d/msgid/ansible-project/28bc59f9-ff76-4c65-b6cc-44521f53cc03%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> >> gpg public key: http://dpaste.com/1CEJ38Z >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Ansible Project" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/ansible-project/7ERrHwcRdWM/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/CACSH3MvVQBpZ_E%3DUqVG3Pv-fp67Lj%3DukE8TPK3U7ENZ8WraA1Q%40mail.gmail.com >> <https://groups.google.com/d/msgid/ansible-project/CACSH3MvVQBpZ_E%3DUqVG3Pv-fp67Lj%3DukE8TPK3U7ENZ8WraA1Q%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CAMf2dmPChEkHv1LX8ahM4Bx8%2BKU_U-gSCAaP9CFM8b_%2BoNDHQg%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CAMf2dmPChEkHv1LX8ahM4Bx8%2BKU_U-gSCAaP9CFM8b_%2BoNDHQg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Matt Martz @sivel sivel.net -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v9tiooGWYKQSucGMKmWr6Zq9r7oZTqpdcyWP%3DCSa0N_Aw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
