-
Notifications
You must be signed in to change notification settings - Fork 666
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
CRITICAL 'molecule/default/molecule.yml' glob failed. Exiting - Unable to run molecule #4117
Comments
@iamgini, it is hard for us to reproduce the scenario. Is it possible for you to provide more info on the setup, or maybe if you could create a branch with the setups, we can reproduce the error? |
I have the same error but maybe in little different case. |
@shameoff my apologies for the very late response here!
|
I think the error message means that no directory named Looking at your reference code, I see that there is no (assuming that the collection in question is in ansible-real-life/ansible-molecule-demo/ansible-devspaces-demo-brandor5/collections/ansible_collections/sample_namespace/sample_collection) |
I have the same issue. But I found out what was causing it—for me at least. When I run any molecule command and the I am using Molecule inside a dev container. Let me know if you need the config for it. |
Confirming that removing |
I was having thas same error as you had.
Steps to reproduce
Steps to reproduce having multiple roles inside one molecule scenario In the case you want to have multiple roles inside one molecule folder, like this:
To run my_role -> molecule converge -s my_role
I have tried also adding a .gitignore with this content: |
Did you mean to use separate molecule content for each roles? |
@iamgini Hey!, I have just updated the comment, now is more clear and straight forward with an example with two roles inside one molecule scenario, let me know if that helps you |
@valkiriaaquatica oh ok. This is also good. Our approach is a common molecule directory ├── ansible.cfg
├── collections
│ └── ansible_collections
│ ├── iamgini
│ │ ├── meetupdemo
│ │ │ ├── docs
│ │ │ ├── extensions
│ │ │ │ └── molecule
│ │ │ │ └── default
│ │ │ │ ├── backup
│ │ │ │ │ └── prepare.yml
│ │ │ │ ├── converge.yml
│ │ │ │ ├── create.yml
│ │ │ │ ├── destroy.yml
│ │ │ │ ├── molecule.yml
│ │ │ │ ├── requirements.yml
│ │ │ │ ├── tasks
│ │ │ │ │ └── create-fail.yml
│ │ │ │ └── verify.yml
│ │ │ ├── galaxy.yml
│ │ │ ├── meta
│ │ │ │ └── runtime.yml
│ │ │ ├── playbooks
│ │ │ │ └── install_web.yaml
│ │ │ ├── plugins
│ │ │ │ └── README.md
│ │ │ ├── README.md
│ │ │ └── roles
│ │ │ └── web
│ │ │ ├── defaults
│ │ │ │ └── main.yml
│ │ │ ├── files
│ │ │ ├── handlers
│ │ │ │ └── main.yml
│ │ │ ├── meta
│ │ │ │ └── main.yml
│ │ │ ├── README.md
│ │ │ ├── tasks
│ │ │ │ └── main.yml
│ │ │ ├── templates
│ │ │ ├── tests
│ │ │ │ ├── inventory
│ │ │ │ └── test.yml
│ │ │ └── vars |
@iamgini thanks for the info. I've just created your example asi is shown below (quick approach) but instead of giving the inside folder of molecule the default value i changed it to my_rol_of_iamgini (execute the molecule init scenario my_rol_of_iamgini) .
Then i move to route below and exexute the following
Hope it helps you |
As was mentioned by @Ic0n4, Molecule fails to find the glob if the molecule files are under a folder in
Is there any reason for this? I have a use case where I want my molecule files to not be checked into version control. This behavior seems unintentional to me. |
I had this problem when I accidentally named the parent directory ❯ cd extension
❯ molecule test --all
CRITICAL 'molecule/*/molecule.yml' glob failed. Exiting.
❯ cd ..
❯ mv extension{,s}
❯ cd extensions
❯ molecule test --all
WARNING Driver podman does not provide a schema.
INFO Performing prerun with role_name_check=0...
INFO Running nginx > dependency
WARNING Skipping, missing the requirements file.
WARNING Skipping, missing the requirements file. |
I had this issue and I could not figure it out:
The molecule file had a space at the start of the file name. 🤦 |
Prerequisites
pip check
does not report any conflictsEnvironment
What happened
I have a collection with molecule configured and its working perfectly in one folder.
Now I am trying to copy the molecule setup for another collection but facing the below error.
I tried:
molecule init scenario
Any idea?
Reference code: https://github.com/iamgini/ansible-real-life/tree/main/ansible-molecule-demo
Reproducing example
No response
The text was updated successfully, but these errors were encountered: