Hi guys,
Newbie in ansible. Anybody can help me to understand the the lookup syntax below.
- hosts: test
roles: - { role: test
data_file: {{ lookup(‘file’, ‘xyz/abc’) }}
}
Note sure I’ll get all the content of the ‘xyz/abc’ file or just get the file path, then I can use it in the playbook:
- name: copy template
file: src=${data_file} dest=/tmp/abc …
Btw, I can’t find the full syntac page about the kind of “lookup” usage, anyone can help to turn on the light for me? thanks very much!
Thanks,
Dean