Hey,

I have on file csv "clef_applicatives.csv" with this content :

13,my_user,my_host,gis
14,my_user,my_host,gis


I have next tasks with this content :

- set_fact:
    indice: "{{ item.split(',')[0] }}"
  with_lines: cat /home/ansible/test/test_ssh_manager/clef_applicatives.csv
  when: item.split(',')[2] == inventory_hostname
  delegate_to: localhost

- name: "Afficher indice"
  debug:
    msg: "{{ indice }}"

The problem is that my variable indice get only last indice of my file who 
is 14 and not 13.

How do for that ansible play playbook with this both values.
(there is probabily other values in this file ...)

Help me please community ansible !!!!

Regards,

Karther

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d315227b-20a3-4af7-ae7c-a3af1854c69f%40googlegroups.com.

Reply via email to