Should automation developers be starting with role-only collections?
I genuinely cannot answer that, and following up on my earlier posts about group two (the folks testing roles and playbooks rather than Python modules), what surprised me digging in is that there does not seem to be an official answer either. The guidance across docs.ansible.com is not consistent about it, and I could not find an authoritative position anywhere on whether a role or playbook author should be working inside a collection at all.
That unanswered question matters because the tooling has quietly answered it for us. The modern, supported, CI-ready testing path (ansible-creator scaffolding, pytest-ansible, tox-ansible, antsibull-nox) has converged on the extensions/molecule/ layout, which only exists inside a collection. So the moment you want supported testing, you are in collection territory whether or not you ever decided a collection was the right unit for your work.
Getting reliable information along the way is harder than it should be too. In an earlier post I said standalone role testing was stable and well documented. Having gone through the current state, I have to walk that back. The examples are abundant, but most of them predate Molecule’s “ansible-native” rework (v25.9, September 2025), which changed how scenarios are configured, and they teach a model the project now treats as legacy. Those older resources are still what you find first: a search for how to test a role surfaces the old driver:/platforms: style, some of it very recent (I found a tutorial dated April 2026, tested against Molecule 26.4.0, still teaching the deprecated config). Meanwhile Molecule’s current docs no longer include a getting-started guide specifically for a role, only playbooks and collections, and the official guidance is not consistent about which shape it assumes (the Dev Tools testing page documents only a role within a collection, while the Sample Ansible setup page assumes bare roles and playbooks). To be clear, the recent Molecule docs rework by @cidrblock and team is a genuine and much-needed improvement. The problem now is discoverability: the good current material is not what a search turns up.
Even past the outdated information, the structural complexity is real, and it spikes as soon as content moves into a collection. This is where I think we under-serve role-only users:
- A wave of additional tools arrives at once. Beyond Molecule you are now looking at
ansible-creator,ansible-test,pytest-ansible, and one oftox-ansibleorantsibull-nox, plus thegalaxy.ymland namespace and versioning that come with the collection format itself. Each looks optional in isolation, but they interlock. - Documentation and examples for role-only collections are thin. Most collection-testing material assumes there are modules in the collection, so a role-only author has to work out which of that long list actually applies to them.
- Each of those tools brings its own configuration, and that is where the hidden complexity lives:
- Where the config even lives. Molecule alone splits across a shared
extensions/molecule/config.yml, a per-scenariomolecule.yml, and aninventory.yml, and thentox-ansibleorantsibull-noxadds atox.inior anoxfile.pyplusantsibull-nox.tomlon top. - Redirection and inheritance between those files. The shared base config is inherited and overridden per scenario, and one tool invokes another (for example
tox-ansibleruns Molecule throughpytest-ansible), so tracing what actually ran, and why, means chasing config across several files. - The config is python-centric. A
noxfile.pyis literally Python, and the pytest integration test is a Python file. Someone whose whole world is YAML is now editing Python to run a test. - None of it is familiar. nox, tox, and pytest are conventions from the Python developer world, not something a YAML automation author has any reason to already know.
- Where the config even lives. Molecule alone splits across a shared
So I think we need to definitively answer this question first, should a role or playbook author be starting in a collection? If the answer is yes, then the role-only, content-focused case needs to be tailored to automation developers writing YAML rather than python. It needs to be first-class and out of the box, with its own documentation and examples and not something an author reverse-engineers from module-oriented tooling.
Originally posted in Unified Collection Testing Strategy - Kick off & Landscape Overview - Split into separate post.