-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Molecule Reset overwrites projects in COLLECTIONS_PATHS #4061
Comments
It happened to me too yesterday when running molecule test. Sounds similar enough. |
I had the same problem today running I think this is caused by #3962. One user even commented that the changes in this pull request will cause problems. |
Prerequisites
pip check
does not report any conflictsEnvironment
molecule 6.0.2 using python 3.11
ansible:2.15.1
default:6.0.2 from molecule
Linux wsl 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 GNU/Linux
Ubuntu 22.04.2 LTS
What happened
Running molecule reset can delete the entire project. The role is in a collection and I think the issue is it tries to install the same collection from GitLab using ansible-galaxy, since my collections path is the same as my development path it overwrites my project. I've been using this same setup for years and this did not happen with previous versions of Molecule.
I am actively developing the collection so it is expected that I might need to run them. When I run them they need to be on the collections path.
If I edit my ansible.cfg and comment out the collections_path, it works correctly:
I could probably work around it by using a shell function or alias but I don't want to have to rely on a workaround.
Reproducing example
I've lost all of my uncommitted changes.
The text was updated successfully, but these errors were encountered: