Lookup plugin with roles and passed-in file references

In issue 2697, Michael added the ability to use the lookup plugin to find files directly in a role’s files/ directory:
https://github.com/ansible/ansible/issues/2697Thus, the directory containing the play (generally roles//tasks) is examined and then roles//files/.

If we pass in files to a role via a group_vars file, the file references are relative to the basedir of the inventory dir.

What do you recommend for how to tell the role where to find those files?

We currently prepend ‘…/…/…/’ to the file path but this would break if the role were found on a file path not in that relative position.

“If we pass in files to a role via a group_vars file, the file references are relative to the basedir of the inventory dir.”

I generally benefit greatly from examples and seeing things graphically or laid out.

Can you show me what that looks like?

Thanks!