When building ansible roles in an ansible-galaxy compatible manner (or forking them from github) the root of the ansible role definition is the root of the repository.
Let's say we have a repo with a name of myname.ansible-role-name, which will result in an root file structure of:
When using molecule to test these locally you can just run "molecule test" in the root of this directory structure as long as the name of the directory you are in matches the name of the role specified in molecule/default/playbook.yml
Then when you execute the pipeline to run your molecule tests the system is unable to find the role you have defined because it is checked out into the path defined by the BITBUCKET_CLONE_DIR of /opt/atlassian/pipelines/agent/build
The proposed change would be that the code is checked out into
instead to solve the problem (and creating a build symlink to this $BITBUCKET_REPO_SLUG would probably help for backwards compatibility).
This will likely help other path aware/dependent code builds and automation pipelines.