Solved,

Le mardi 5 mars 2019 09:53:08 UTC+1, [email protected] a écrit :
>
> Hy all,
>
> I have this task :
>
> - set_fact:
>       liste_appli: "{{ item.split(',')[3:] }}"
>   with_lines: cat /home/ansible/ssh_manager/clef_applicatives.csv
>   when: (item.split(',')[1] == ansible_user) and (item.split(',')[2] == 
> inventory_hostname)
>   delegate_to: localhost
>
> And i have this task who count number of element in variable liste_appli:
>
> - set_fact:
>     long_liste: "{{ liste_appli | length }}"
>
> But content of *long_liste* is only one number, or i want that this 
> variable content all indice of my variable *liste_appli.*
>
> Exemple :
>
> *liste_appli* = "valeur1", "valeur2", "valeur3"
>
> *long_liste* = [0,1,2]
>
> Someone have idea ?
>
> Thank you very much guy !!
>
> Regards
>

-- 
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/1315061b-b9a0-4429-bac0-b475f8a53833%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to