It looks relative to the playbook root, and if in roles, will look in the "files/" dir of roles.
If you try it and it can't find something, it will tell you where it looked. On Wed, Jul 23, 2014 at 4:48 PM, Dmitry Makovey <[email protected]> wrote: > 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? > > -- > 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/aafcc319-4242-46ac-9837-79f6629d5571%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/aafcc319-4242-46ac-9837-79f6629d5571%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BnsWgy%2BomnQ4OiB%2BAVuwZKt-MobNUVJzNsoqBotEQoMj-xnJA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
