ansible-community / molecule-plugins

Collection on molecule plugins
MIT License
115 stars 76 forks source link

Parallel execution fails #49

Open lod opened 4 years ago

lod commented 4 years ago

Each AWS region has a single namespace

Attempting to run multiple molecule test runs causes each run to clash with the other. Most obviously with the keypair.

This prevents molecule-ec2 being efficiently used as part of automated test pipelines.

jgoldschrafe commented 3 years ago

Hey @lod! This was bugging me too, so I just fixed this in ansible-community/molecule-ec2#42 by generating a unique run ID that's attached to each scenario's ephemeral directory, so it should work not just for concurrently testing multiple roles, but for multiple people testing multiple versions of each role concurrently.

As a bonus, you don't have to actually create an EC2 keypair resource anymore—it's still there by default, but there's a new option to inject the key into cloud-init user data so there's less churn and fewer resources to clean up.

If you're still tracking this, could you let me know if it's fixed for you too?