Thanks Brian! It doing something more now, that's good :)

However, I now get this error:

fatal: [localhost] => Failed to template msg="{{ lookup('csvfile', item + ' 
file=test.csv delimiter="," col=2') }}": csvfile: "delimiter" must be string
, not unicode

I tried quoting the comma, double and single. And tried the approach in 
this thread, both single and 
double: https://groups.google.com/forum/#!topic/ansible-project/r2L3UONwaN0 
like so:

debug: msg="{{ lookup('csvfile', item + ' file=test.csv delimiter='","' 
col=2') }}"

But also doesn't work.

Any ideas?



Op dinsdag 7 juli 2015 22:23:18 UTC+2 schreef Brian Coca:
>
> you are forcing item to be a static string, it needs to be like this: 
>
> - name: read from csv file 
>   debug: msg="{{ lookup('csvfile', item + ' file=/path/to/file.csv 
> delimiter=, col=1') }}" 
>   with_items: test_ids 
>
> -- 
> Brian Coca 
>

-- 
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/a5a39b91-5c6d-4b82-9766-4da3d6aa1639%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to