Hello Ansible folk,
I have a text file of the form:
10.60.43.23 worker22.domain
I was to use the "csvfile" lookup plugin to look up name host name, given
an IP address. So I'm trying this:
- name: hostname lookup
debug:
msg: hostname is {{ lookup("csvfile",ansible_default_ipv4["address"]+"
file=hostnames.hdp1 delimiter=' '") }}
However, running this snippet gives me the error:
TASK [hostname lookup]
*********************************************************
fatal: [worker22.domain]: FAILED! => {"failed": true, "msg": "need more
than 1 value to unpack"}
I can't understand what Ansible is actually failing on. I've tried to run
with -vvvv, but it seems this error occurs before the debug module is even
transferred to the remote host for execution. If anyone knows what this
error means, and how I can avoid it, I would greatly appreciate the help.
Regards,
Anand
--
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/13b200a7-52fe-439f-85e2-997393bce7b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.