Prerequisites
Environment
INFO Found config file /home/x/ansible-repo/.config/molecule/config.yml
molecule 25.12.0 using python 3.12
ansible:2.19.5
default:25.12.0 from molecule
What happened
Including shared playbooks from a .config/molecule/config.yml file (such as create.yml) sets the current path to the executing scenario's directory, and not to .config/molecule. I would have expected to be able to refer to files relative to the current file, eg in .config/molecule.
Trying to mitigate that, there is also no environment variable that can be used to create stable paths relative to the VCS root.
With new ansible-native configuration it would be very useful to share instance creation playbooks between all collections and scenarios in a monorepo. For all I know this behaviour makes this endeavour impossible.
Reproducing example
# .config/molecule/config.yml
---
ansible:
executor:
backend: ansible-playbook
playbooks:
create: create.yml
Prerequisites
pip checkdoes not report any conflictsEnvironment
INFO Found config file /home/x/ansible-repo/.config/molecule/config.yml
molecule 25.12.0 using python 3.12
ansible:2.19.5
default:25.12.0 from molecule
What happened
Including shared playbooks from a
.config/molecule/config.ymlfile (such ascreate.yml) sets the current path to the executing scenario's directory, and not to.config/molecule. I would have expected to be able to refer to files relative to the current file, eg in.config/molecule.Trying to mitigate that, there is also no environment variable that can be used to create stable paths relative to the VCS root.
With new ansible-native configuration it would be very useful to share instance creation playbooks between all collections and scenarios in a monorepo. For all I know this behaviour makes this endeavour impossible.
Reproducing example