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:
bitbucket-pipelines.yml defaults/ files/ handlers/ meta/ molecule/ README.md requirements.txt tasks/ templates/ vars/
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
--- - name: Converge hosts: all roles: - role: myname.ansible-role-name
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
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.