Thanks for this answer this what I thought, but I wasn't understood why it 
worked for one but not for the other, now I understand.

I have to found an another way to do want I want but how ?
How can I do nested loop ?

I have n users et for each user m groups, the with_items synthax cannot be 
used, this is why I've made an include/with_items (first loop) than in my 
included playbook a with_item on a task (second loop).

Do you an idea to do this ?

Thanks


Le mercredi 20 novembre 2013 22:37:11 UTC+1, Serge van Ginderachter a 
écrit :
>
>
> On 20 November 2013 22:23, Yoann DAVID <[email protected] 
> <javascript:>>wrote:
>
>> roles/usertest/tasks/main.yml : nothing changed
>>
>>> - include: tasks_user.yml user=$item
>>>   with_items: $users
>>>
>>
> This is your problem. "include:" combined with "with_items" is a non 
> documented, non supported idiom.
> While this works when defined in a vars file ( = same variables for all 
> hosts, where this can work in a consequent way0), it can't when defined at 
> inventory level, which group_vars/all is, and where you could give 
> different variable values for different hosts: this can't work, as 
> include+with items is parsed at the beginning, before inventory variables 
> is looked at!
>
> Don't try both though, It is a deprecated feature in 1.4, and will 
> probably be removed in 1.5.
>
> Serge
>
>

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to