ansible-community / ansible-community/molecule-plugins

EC2 driver volumes parameter does not validate against Molecule schema.

Open
#140 2 comments 0 reactions 0 assignees View on GitHub
ec2
Dominant language
Python
Stars
164
Forks
113
Avg merge
4d 20h
Merged PRs (30d)
1

Description

In the platform definition of the EC2 driver, the expected type for the `volumes` parameter is a list of dict - https://github.com/ansible/ansible-lint/blob/main/src/ansiblelint/schemas/molecule.json

The Molecule schema definition for volumes expects a list of string - https://github.com/ansible-community/molecule/blob/main/src/molecule/data/molecule.json#L263-L268

As such, molecule errors out when attempting to create instances when `volumes` is defined in the platform param

An example of what a config for this might look like:

```yaml
volumes:
- device_name: /dev/sda1
ebs:
volume_size: 16
delete_on_termination: true
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Compare the EC2 platform definition in ansiblelint/schemas/molecule.json with Molecule's src/molecule/data/molecule.json volume definition. Start by checking how the example volumes configuration is validated, then confirm that Molecule can create instances without a schema error when the configuration is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.