# Molecule EC2 non functioning

**URL:** <https://forum.ansible.com/t/molecule-ec2-non-functioning/8000>\
**Category:** Get Help\
**Tags:** ubuntu, aws, molecule, galaxy-ng\
**Created:** [August 20, 2024, 5:45pm UTC](https://forum.ansible.com/t/molecule-ec2-non-functioning/8000 "2024-08-20T17:45:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwinngs](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dwinngs/32/4542_2.png) [@dwinngs](https://forum.ansible.com/u/dwinngs)\
**Post date:** [August 20, 2024, 5:45pm UTC](https://forum.ansible.com/t/molecule-ec2-non-functioning/8000/1 "2024-08-20T17:45:10Z")

</div>

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`.

```auto
❯ 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.

> <https://github.com/ansible-community/molecule-plugins/blob/main/src/molecule_plugins/ec2/cookiecutter/%7B%7Bcookiecutter.molecule_directory%7D%7D/%7B%7Bcookiecutter.scenario_name%7D%7D/create.yml>

#### Things I’ve done so far

- follow the [docs](https://github.com/ansible-community/molecule-plugins/blob/main/doc/ec2/platforms.rst) 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

```auto
---
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

---

<div class="post-metadata">

**Author:** ![dwinngs](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dwinngs/32/4542_2.png) [@dwinngs](https://forum.ansible.com/u/dwinngs)\
**Post date:** [August 20, 2024, 7:16pm UTC](https://forum.ansible.com/t/molecule-ec2-non-functioning/8000/2 "2024-08-20T19:16:14Z")

</div>

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.
