Hello all, I'm trying to do a csvlookup that references a variable so I can dynamically choose which line of the file. I tried the first two thinks to do the lookup with name only the third directly referencing the name works
- hosts: "{{ target }}" vars: name : "REALUSER" uid : "{{ lookup('csvfile', ''name delimiter=: file=/etc/passwd col=2 ') }}" gid : '{{ lookup("csvfile", name + "file=/etc/passwd col=3 delimiter=:") }}' comment : '{{ lookup("csvfile", "REALUSER file=/etc/passwd delimiter=: col=4") }}' tasks: - debug: msg="The uid is {{ uid }} and the name is {{name}} and the gid is {{ gid }}" -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/41fe4265-8fb9-454a-bb31-21a6b8aa0ea8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.