Molecule test has stopped working with my ansible role
Asked Answered
D

1

5

I just started with molecule, followed a nice simple tutorial and I generated a role and did a molecule test and it worked as intended. I rebooted my machine the following day and it's stopped working again. ERROR: 'molecule/*/molecule.yml' glob failed. Exiting.

I am using a macbook pro 10.13.6 and below are necessary information.

do-enr-mac-4:default joseph$ ansible --version
ansible 2.7.7
config file = /Users/joseph/.ansible.cfg
configured module search path = 
['/Users/joseph/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
ansible python module location = 
/Users/joseph/.pyenv/versions/3.6.3/lib/python3.6/site-packages/ansible
executable location = /Users/joseph/.pyenv/versions/3.6.3/bin/ansible
python version = 3.6.3 (default, Dec 20 2017, 08:10:54) [GCC 4.2.1 
Compatible Apple LLVM 9.0.0 (clang-900.0.38)]
do-enr-mac-4:default joseph$ 
do-enr-mac-4:default joseph$ 
do-enr-mac-4:default joseph$ molecule --version
molecule, version 2.20.1
do-enr-mac-4:default joseph$ vagrant --version
Vagrant 2.2.4
do-enr-mac-4:default joseph$ pip freeze | grep vagrant
python-vagrant==0.5.15
do-enr-mac-4:default joseph$ pip freeze | grep molecule
molecule==2.20.1
do-enr-mac-4:default joseph$ ls
INSTALL.rst     molecule.yml    playbook.yml    prepare.yml     tests
do-enr-mac-4:default joseph$ molecule --debug test
 ERROR: 'molecule/*/molecule.yml' glob failed.  Exiting.
do-enr-mac-4:default joseph$ python --version
Python 3.6.3

problem is all search on google shows this issue way back in 2017 and it has to do with versions people used which are all different from mine right now. The debug switch is not of the molecule command is not being helpful currently so I have no information to solve this. I wanted to find out if anybody has been through this before . Thanks in advance.

Demilune answered 29/5, 2019 at 12:43 Comment(0)
A
14

I infer from your ls command above and your prompt that you are launching molecule from inside your default scenario dir.

Just go back two levels (cd ../..) inside your root role dir and you're back on track.

Ashraf answered 29/5, 2019 at 15:21 Comment(1)
So you have to be right OUTSIDE the molecule directory.Vaivode

© 2022 - 2024 — McMap. All rights reserved.