Good thing to remember:

Always use curly brackets if you want to access variables, except in in 
"when"- directives (failed_when, success_when, when).  Conditionals are 
always processed by jinja2 templating.

Am Donnerstag, 6. Juli 2017 19:11:24 UTC+2 schrieb Paolo Galizzi:
>
> I confirm this resolve my issue, thanks!
>
> On Thursday, July 6, 2017 at 11:23:03 AM UTC+2, Kai Stian Olstad wrote:
>>
>> On 05.07.2017 12:53, Paolo Galizzi wrote: 
>> > - name: 'Item' 
>> >   debug: 
>> >     var: item 
>> >   with_items: databases 
>> > 
>> > 
>> > - name: 'Item Name' 
>> >   debug: 
>> >     var: item.name 
>> >   with_items: databases 
>>
>> In earlier Ansible version "with_items: databases" the databases was 
>> seen as a variable, in newer version it's seen as the literal string 
>> databases. 
>>
>> So in 2.3 you need to add the curly brackets but this syntax also works 
>> in previous version of Ansible. 
>>
>> - name: 'Item Name' 
>>    debug: 
>>      var: item.name 
>>    with_items: '{{ databases }}' 
>>
>>
>> -- 
>> 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/97744127-6437-4843-a2ab-8557f733b00c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to