Summary
When scaffolding a new collection with ansible-creator init collection, the generated Molecule integration test target is named hello_world (with scenario integration_hello_world), but it actually tests the sample_filter plugin — not a plugin called hello_world.
This breaks the naming convention that Molecule's shared converge.yml relies on (scenario integration_X → target X → tests plugin X), and creates confusion when users add new plugins.
Steps to reproduce
ansible-creator init collection mynamespace.mycollection /tmp/mynamespace.mycollection
Expected behavior
The integration test target name should match the plugin it tests. Either:
- Option A: Rename the test target to
sample_filter and the scenario to integration_sample_filter to match the scaffolded sample_filter.py plugin
- Option B: Rename the scaffolded plugin from
sample_filter.py to hello_world.py to match the test target
Actual behavior
- Scaffolded plugin:
plugins/filter/sample_filter.py
- Molecule scenario:
extensions/molecule/integration_hello_world
- Test target:
tests/integration/targets/hello_world/tasks/main.yml
- The test target calls
mynamespace.mycollection.sample_filter, not hello_world
Why this matters
- Users assume the test validates a
hello_world plugin based on the naming
- If a user creates a new plugin called
hello_world (e.g., via ansible-creator add plugin filter hello_world), the existing test still passes — but it's validating sample_filter, not the new plugin
- The inconsistency makes it harder for users learning Molecule to understand the scenario-to-target-to-plugin mapping
Environment
ansible-creator 26.4.2
ansible-core 2.20.5
Summary
When scaffolding a new collection with
ansible-creator init collection, the generated Molecule integration test target is namedhello_world(with scenariointegration_hello_world), but it actually tests thesample_filterplugin — not a plugin calledhello_world.This breaks the naming convention that Molecule's shared
converge.ymlrelies on (scenariointegration_X→ targetX→ tests pluginX), and creates confusion when users add new plugins.Steps to reproduce
Expected behavior
The integration test target name should match the plugin it tests. Either:
sample_filterand the scenario tointegration_sample_filterto match the scaffoldedsample_filter.pypluginsample_filter.pytohello_world.pyto match the test targetActual behavior
plugins/filter/sample_filter.pyextensions/molecule/integration_hello_worldtests/integration/targets/hello_world/tasks/main.ymlmynamespace.mycollection.sample_filter, nothello_worldWhy this matters
hello_worldplugin based on the naminghello_world(e.g., viaansible-creator add plugin filter hello_world), the existing test still passes — but it's validatingsample_filter, not the new pluginEnvironment
ansible-creator26.4.2ansible-core2.20.5