Thanks alot ^^
On Thursday, November 10, 2016 at 3:32:52 PM UTC+1, Kai Stian Olstad wrote:
>
> On 10. nov. 2016 15:20, Dader Grund wrote:
> > i have defined following variables in my playbook:
> > -
> > vars:
> > ip:
> > fw1: 0.0.0.1
> > fw2: 0.0.0.2
> >
> > -
> >
> > temple.j2 contains :
> >
> > {% for addr in ip %} {{ addr }} {% endfor %}
> >
> > # this returns the name of the fields : fw1 fw2
> >
> > what should i edit in the for loop inoder to return the values of the
> > fields ? namely 0.0.0.1 0.0.0.2
>
> {% for key, value in ip.iteritems() %} {{ value }} {% endfor %}
>
> To read more about it
> http://jinja.pocoo.org/docs/dev/templates/#for
>
>
> --
> Kai Stian Olstad
>
--
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/5613f097-07f8-4458-8f58-4084f8c54f99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.