Kai Stian, I hope you can help with one more question. I searched but could
not find out how to insert an ansible variable into the django loop.
---
{% set title = csvfile.split("\n")[0].split(',') %}
{% for item in csvfile.split("\n")[1:] %}
{% if "*{{inventory_hostname}}*" in item %}
{% set list = item.split(",") %}
{% for element in range(list | count) %}
{{ title[element]|trim }}: {{ list[element]|trim }}
{% endfor %}
{% endif %}
{% endfor %}
--
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/0967c74a-e7bc-4cda-b796-9721ab63a84b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.