On Friday, 8 December 2017 02.42.11 CET texas living wrote:
> I found out how. I created a variable for the {{ inventory_hostname }}
> first.
>
> vars:
> vsrx: "{{ inventory_hostname }}"
>
> {% set title = csvfile.split("\n")[0].split(',') %}
> {% for item in csvfile.split("\n")[1:] %}
> *{% if vsrx in item %}*
You don't need to do that, just use inventory_hostname directly, it's already a
variable.
{% if inventory_hostname in item %}
--
Kai Stian Olstad
--
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/1735117.tWP1I2EIz5%40x1.
For more options, visit https://groups.google.com/d/optout.