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/4f15c9b2-7de2-4516-a5d8-9b193a2892ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to