Ansible is used to deploy docker-compose on a system and subsequently start the container.
When ansible runs from the local system, the docker-compose file is deployed using Ansible.
When the code is pushed to bitbucket the file content is:
and the CI deploys this on the system as well.
project/ansible project/docker-compose.yml project/ansible/roles/role/files/docker-compose.yml
In order to prevent that the docker-compose.yml need to be changed on two places, a symlink has been created, but that seems to be ignored by bitbucket as the link instead of the content reside in this file.
This Q&A indicates that:
The data referenced by the symlink is not stored in the repository.
and creating a symlink to avoid code duplication in docker-compose.yml seems to cause the problem.