On Thu, Nov 12, 2015 at 5:44 AM, Edgardo Vega <
edgard...@gmail.com> wrote:
> Thanks Matt! is there way to do this in a playbook. The first one works the
> second one doesn't.
>
> - debug: msg="hey {{ item }}"
> with_items: groups['tag_env_prod']
>
> - debug: msg="hey {{ item }}"
> with_items: groups['{{group_name}}']
>
> On Thursday, November 12, 2015 at 7:59:20 AM UTC-5, Matt Martz wrote:
>>
>> 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 <
edgard...@gmail.com> 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