molecule icon indicating copy to clipboard operation
molecule copied to clipboard

Empty molecule.yml when using --base-config

Open mNantern opened this issue 3 years ago • 2 comments

Issue Type

  • Bug report

Molecule and Ansible details

ansible --version && molecule --version

molecule 4.0.4 using python 3.9 
ansible:2.14.1
delegated:4.0.4 from molecule
 docker:2.1.0 from molecule_docker requiring collections: community.docker>=3.0.2 ansible.posix>=1.4.0

Molecule installation method (one of):

  • pip

Ansible installation method (one of):

  • pip

Desired Behavior

I'm using --base-config in order to abstract all the content of molecule.yml. This allow me to not duplicate otherwise identical content in all my roles.

Unfortunately I still need to keep an almost empty file in <role>/molecule/default/molecule.yml. It would be a lot cleaner if I can remove completely the file molecule.yml from inside the role and only keep the global one.

Actual Behaviour

If I try to test a role without a molecule.yml I have the following error:

CRITICAL 'molecule/*/molecule.yml' glob failed.  Exiting.

mNantern avatar Dec 20 '22 15:12 mNantern

When not having anything in default, you must use a scenario name (-s or --scenario-name).

isuftin avatar Jan 03 '23 18:01 isuftin

When not having anything in default, you must use a scenario name (-s or --scenario-name).

That's irrelevant to the reported error, you do need an empty molecule.yml file in the scenario you try to use, whether or not it's the default scenario.

gardar avatar Jan 04 '23 12:01 gardar