Thanks, Brian. It's disappointing not to be able to get the actual search path. This means that the doc is wrong (or at least incomplete), so one has to "just know" that a role can also be in the current working directory, in the playbook directory, and in two other secret locations - as well as the documented ones.
The reason I was looking for this information is that I need to add a path to the roles search path. I began an experiment to see if the ansible.cfg "roles_path" variable would be added to or override the defaults. I still haven't done that experiment, because I got distracted by the question of how to locate the search path at all :-) I discovered the playbook directory component because I initially moved my test role there (out of the ./playbook/roles directory) thinking that would prevent it from being found, and was surprised to see it still ran... so I moved it up to my current working directory (above the playbooks directory) and was surprised again to see that it STILL ran! IMHO a way to see the *actual* search path, rather than just the default or configured parts of it, would be useful. Regards, K. On Wed, Apr 25, 2018 at 6:25 AM, Brian Coca <[email protected]> wrote: > You can use `lookup('config', 'DEFAULT_ROLES_PATH')`to get the > configured ones, but that won't include the adjacent to playbook, but > {{playbook_dir}}/roles would give you that. > > > -- > ---------- > Brian Coca > > -- > 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/CACVha7fyjNxNuk0hua81ztWzdeyJK > dZLea%2B6UgCKDX_POQe%3DRg%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. > -- Karl Auer Email : [email protected] Website: http://2pisoftware.com GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816 Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA -- 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%2B%2BT08TMsKfih5C9KiYtuNRkJT4VNdnZB0EtVhKmAOHOrRc%3DNA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
