Re: [ansible-project] lookup csvfile with_items issue

2015-07-08 Thread Bart Pit
Any ideas on the "delimiter" must be string, not unicode error? Op dinsdag 7 juli 2015 23:55:34 UTC+2 schreef Bart Pit: > > For extra clarification: I started getting this error without the quotes > around the comma. So like this, produces the same error: > > debug

Re: [ansible-project] lookup csvfile with_items issue

2015-07-07 Thread Bart Pit
For extra clarification: I started getting this error without the quotes around the comma. So like this, produces the same error: debug: msg="{{ lookup('csvfile', item + ' file=test.csv delimiter=, col=2') }}" Op dinsdag 7 juli 2015 22:57:47 UTC+2 schreef Bart P

Re: [ansible-project] lookup csvfile with_items issue

2015-07-07 Thread Bart Pit
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 s

[ansible-project] lookup csvfile with_items issue

2015-07-07 Thread Bart Pit
Hi! I'm struggling to get 'lookup' with 'csvfile' in combination with 'with_items' to work. I have this csv file (shortened snippet): "col1","col2" 1,"Mike" 2,"Sally" Than I also have this var: test_ids: - 1 - 2 Now I want to lookup (docs: https://docs.ansible.com/playbooks_lookups.html#