ISSUE TYPE
SUMMARY
ansible-creator init scaffolds collection, playbook, and execution_env, but not role.
The only role path is add resource role, which targets an existing collection, so there is no way
to scaffold a standalone role, the most common artifact a YAML author reaches for after a single
playbook. ansible-galaxy role init leaves them with a bare skeleton: no molecule scenario, no
argument_specs, and metadata that does not pass ansible-lint.
The ask, staged so the MVP stands on its own:
- Minimum:
init role <name> emitting the standard role skeleton with real, lint-clean
metadata and a meta/argument_specs.yml starter.
- Then: the batteries the other
init types already emit, chiefly a native-ansible Molecule
scenario that converges green out of the box (plus CI, dev-container, lint wiring). creator
already renders the role templates via add resource role and already emits these batteries for
init collection, so this is mostly wiring existing pieces to a standalone target.
Happy to help: I can provide working examples of what I think this content should look like.
Scaffolding is even more important to help with testing. Molecule's ansible-native driver switch moved the create/destroy/inventory contract into the author's hands, and the setup process is not intuitive or as easy to implement. Having a common starting point drastically reduces the learning curve. It also standardizes the implementation methods so that additional capabilities and tooling can be built to support role testing like exist for collections.
Prior art / duplicate check (ansible-creator tracker): no existing issue requests a
standalone init role. Closest is #41 (enhanced best-practices scaffolding, done via PR #110);
adjacent open items are #362 (turn off the sample role in a new collection), #338/#251 (molecule
scenarios for existing roles), and #439 (add resource role scope). None cover a standalone role
project.
Reproduction:
ansible-creator init --help -> types are collection, playbook, execution_env; no role.
ansible-creator init role myrole -> not a recognized subcommand.
role appears only under ansible-creator add resource role, scoped to an existing collection.
ISSUE TYPE
SUMMARY
ansible-creator initscaffoldscollection,playbook, andexecution_env, but notrole.The only role path is
add resource role, which targets an existing collection, so there is no wayto scaffold a standalone role, the most common artifact a YAML author reaches for after a single
playbook.
ansible-galaxy role initleaves them with a bare skeleton: no molecule scenario, noargument_specs, and metadata that does not passansible-lint.The ask, staged so the MVP stands on its own:
init role <name>emitting the standard role skeleton with real, lint-cleanmetadata and a
meta/argument_specs.ymlstarter.inittypes already emit, chiefly a native-ansible Moleculescenario that converges green out of the box (plus CI, dev-container, lint wiring). creator
already renders the role templates via
add resource roleand already emits these batteries forinit collection, so this is mostly wiring existing pieces to a standalone target.Happy to help: I can provide working examples of what I think this content should look like.
Scaffolding is even more important to help with testing. Molecule's ansible-native driver switch moved the create/destroy/inventory contract into the author's hands, and the setup process is not intuitive or as easy to implement. Having a common starting point drastically reduces the learning curve. It also standardizes the implementation methods so that additional capabilities and tooling can be built to support role testing like exist for collections.
Prior art / duplicate check (
ansible-creatortracker): no existing issue requests astandalone
init role. Closest is #41 (enhanced best-practices scaffolding, done via PR #110);adjacent open items are #362 (turn off the sample role in a new collection), #338/#251 (molecule
scenarios for existing roles), and #439 (
add resource rolescope). None cover a standalone roleproject.
Reproduction:
ansible-creator init --help-> types arecollection,playbook,execution_env; norole.ansible-creator init role myrole-> not a recognized subcommand.roleappears only underansible-creator add resource role, scoped to an existing collection.