You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was not already reported in the past (duplicate check)
It does reproduce it with code from main branch (latest unreleased version)
I include a minimal example for reproducing the bug
The bug is not trivial, as for those a direct pull-request is preferred
Running pip check does not report any conflicts
I was able to reproduce the issue on a different machine
The issue is not specific to any driver other than 'default' one
Environment
OS Release: Red Hat 8.9
$molecule --version
molecule 6.0.3 using python 3.11
ansible:2.16.2
azure:23.5.0 from molecule_plugins
containers:23.5.0 from molecule_plugins requiring collections: ansible.posix>=1.3.0 community.docker>=1.9.1 containers.podman>=1.8.1
default:6.0.3 from molecule
docker:23.5.0 from molecule_plugins requiring collections: community.docker>=3.0.2 ansible.posix>=1.4.0
ec2:23.5.0 from molecule_plugins
gce:23.5.0 from molecule_plugins requiring collections: google.cloud>=1.0.2 community.crypto>=1.8.0
podman:23.5.0 from molecule_plugins requiring collections: containers.podman>=1.7.0 ansible.posix>=1.3.0
vagrant:23.5.0 from molecule_plugins
What happened
ISSUE:
Molecule settings put into {PROJECT_DIR}/.config/molecule/config.yml are not found or used, but they are if I move .config/molecule/.config.yml to my user home directory.
EXPECTATIONS:
Molecule documentation states that we can put configurations into {PROJECT_DIR}/.config/molecule/config.yml or into ~/.config/molecule/config.yml So both options should work.
Here's what I see if I configure using ~/.config/molecule/config.yml - it finds the file and the settings are used, this is good:
$ molecule converge
INFO Found config file /home/my_user/.config/molecule/config.yml
When I remove that ~/.config/molecule/config.yml and only have ./my_project/.config/molecule/config.ymlit does not read these settings. I tried moving the .config directory to all different levels within the project dir with no luck.
POSSIBLE SOLUTION
I believe the issue lies in the find_vcs_root function in the file util.py
Adding , ".config" into the dirs variable in the find_vcs_root function definition line seems to resolve the issue for me:
I wanted to submit this as a PR as it seems fairly trivial but I am having issues getting my environment configured correctly. I apologize in advance if I did not contribute this exactly to the guidelines.
Reproducing example
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
pip check
does not report any conflictsEnvironment
OS Release: Red Hat 8.9
What happened
ISSUE:
Molecule settings put into
{PROJECT_DIR}/.config/molecule/config.yml
are not found or used, but they are if I move.config/molecule/.config.yml
to my user home directory.EXPECTATIONS:
Molecule documentation states that we can put configurations into
{PROJECT_DIR}/.config/molecule/config.yml
or into~/.config/molecule/config.yml
So both options should work.EXAMPLE:
My example directory structure:
Here are the contents of
config.yml
:Here's what I see if I configure using
~/.config/molecule/config.yml
- it finds the file and the settings are used, this is good:When I remove that
~/.config/molecule/config.yml
and only have./my_project/.config/molecule/config.yml
it does not read these settings. I tried moving the .config directory to all different levels within the project dir with no luck.POSSIBLE SOLUTION
I believe the issue lies in the
find_vcs_root
function in the file util.pyAdding
, ".config"
into the dirs variable in thefind_vcs_root
function definition line seems to resolve the issue for me:I wanted to submit this as a PR as it seems fairly trivial but I am having issues getting my environment configured correctly. I apologize in advance if I did not contribute this exactly to the guidelines.
Reproducing example
No response
The text was updated successfully, but these errors were encountered: