Hi,
I'm trying to get through my "slow" day here - can't figure out (or locate documetation explaining it) - where does "lookup('file',...)" looks indeed.
I have a structure:
group_vars/all.yml
pgsql_key
pgsql_key.pub
roles/pgsql/tasks/main.yml
site.yml
under all.yml I have var defined:
...
pgsql_ssh_key="pgsql_key"
...
inside of roles/pgsql/tasks/main.yml I have:
...
debug: var=pgsql_ssh_key
debug: msg={{ lookup('file',pgsql_ssh_key) }}
...
site.yml is simple:
- hosts: pgsql
roles:
- pgsql
however I get empty contents of lookup call while debug for the pgsql_ssh_key returns proper value. Seems like lookup wants to pick up my pgsql_ssh_key under roles/pgsql/files, but I'd like to keep it top-level (other roles will be using it). What did I miss?