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