Molecule EC2 non functioning

Hi,

Just like to ask around if there are any molecule users here using the ec2 driver?

I’m generally using the docker driver with basic configuration and it works fine even without an explicit create.yml file in the scenario.
Now I have a case that I need to test something on EC2 so I was setting up the ec2 driver but it seems like it doesn’t work at all?

This is all I see when I run molecule create.

❯ molecule create
WARNING  Driver ec2 does not provide a schema.
INFO     default scenario test matrix: dependency, create, prepare
INFO     Performing prerun with role_name_check=0...
INFO     Running default > dependency
WARNING  Skipping, missing the requirements file.
WARNING  Skipping, missing the requirements file.
INFO     Running default > create
WARNING  Skipping, create action has no playbook.
INFO     Running default > prepare
WARNING  Skipping, prepare playbook not configured.

It doesn’t attempt to create the EC2 instance at all. It’s like it’s not even attempting to run the create.yml in the plugin here.

Things I’ve done so far

  • follow the docs and setup molecule.yml
  • AWS_PROFILE env var is set
  • molecule-plugins[ec2] deps are installed

I’ve also looked through the code and nothing really weird stands out.
The entrypoint in the setuptools look correct, but it looks as if it straight out ignores the entrypoint so nothing is running.

Here’s what my configuration looks like

---
dependency:
  name: galaxy

driver:
  name: ec2

platforms:
  - name: ubuntu
    # image: ami-0862be96e41dcbf74
    image_owner: "099720109477"
    image_name: ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*
    instance_type: t2.micro
    region: us-east-2
    ssh_user: ubuntu
    vpc_subnet_id: subnet-XXXX 
    key_name: molecule
    private_key_path: ~/.ssh/molecule.pem
    security_groups:
      - sg-XXXXX

provisioner:
  name: ansible

verifier:
  name: ansible

Notes

We’re not using collection at the moment, since we don’t have the need for it, and the docker driver was running fine without it.

All deps are installed within a virtualenv configured via Nix flakes, so there are no weird package conflicts and such afaik.

Any help pointing me to the right direction is appreciated.
Thanks

Turns out it’s molecule breaking things from v6 without good alternatives.

Guess I’ll just have to downgrade back to v5 to get things to work.