You can't nest jinja2 delimiters. You just use bare variable names inside such
as:
{% for host in groups[VAR] %}
On Thursday, November 12, 2015, Edgardo Vega <[email protected]> wrote:
> I am trying to do the following where I index groups by a variable instead
> of hardcoding it. Is that possible somehow?
>
> {% for host in groups['{{VAR}}'] %}
> STUFF
> {% endfor %}
>
>
> Thanks in advance,
>
> Edgardo
>
>
> --
> 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]
> <javascript:_e(%7B%7D,'cvml','ansible-project%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/1d72aea3-f95f-45dc-99c5-f60f07fb51a0%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/1d72aea3-f95f-45dc-99c5-f60f07fb51a0%40googlegroups.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/CAD8N0v8eHhFpkYXVvy2Ly1BpKhh2Gtu%2BSigqmVV4C1nU-WK4VQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.