No Branch/Tag Specified
main
v2.0.0
v1.11.0
v1.10.2
v1.10.1
v1.10.0
v1.9.0
v1.8.0
v1.7.0
v1.6.0
v1.5.0
v1.4.0
v1.3.0
v1.2.0
v1.1.0
v1.0.0
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Needs Triage
Maintainer needs to evaluate this issue
Status
Ready for Agent
Fully specified, ready for an AFK agent
Status
Ready for Human
Requires human implementation
Wayfinder
Grilling
Decision ticket resolved in conversation with the maintainer
Wayfinder
Map
Wayfinder map: index of a planning effort and its decision tickets
Wayfinder
Prototype
Decision ticket resolved by reacting to a rough concrete artifact
Wayfinder
Research
Decision ticket resolved by reading outside sources
Wayfinder
Task
Manual work that must happen before a decision can be made
No labels
Wayfinder
Grilling
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Defame1297
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Mortis/Kamino#93
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #87
Question
What must every role in this Collection have and do, and which of those requirements are checked automatically?
Cover: layout, README shape,
argument_specs, variable naming, declared platforms versus tested platforms, check-mode behaviour, molecule scenario shape (converge, negative tests, verify, idempotence), which Ubuntu releases a role must pass on, and themax_tasksnumber for ansible-lint'scomplexityrule.Context
argument_specsas the documented interface), then from what the maintainer's repositories already do consistently.--checkrun in molecule is a candidate requirement.complexityrule (defaultmax_tasks100) and left the number here. First confirm withansible-lint -Lthat the rule is active under the production profile; that was not verified. The five code-style rules and the form of a rule (rule, reason, how it is held) decided there apply to roles too.Resolution: rules for roles
Decided in a grilling session, every point checked against primary sources (Ansible docs and ansible-core source, molecule source, ansible-lint 26.10.1 source, galaxy-importer, Red Hat CoP automation good practices, linux-system-roles). Each rule: the rule, its reason, how it is held.
Layout. Every role has
tasks/main.yml,defaults/main.yml,meta/main.yml,meta/argument_specs.yml,README.mdandmolecule/default/;vars/holds only constants a consumer must not override. Reason: one predictable shape;vars/outranks inventory, so a default there cannot be overridden (CoP). Held: the scenario by control (select_molecule_scenarios.pyfails a changed role without one); the rest by review.Interface (argument_specs). Every optional input has a value in
defaults/main.ymland an entry in the spec withtype,descriptionand the samedefault:;choicesfor closed value sets;required: trueinputs have no default (CoP: no meaningless defaults). Suboption defaults are documentation only, so the role applies them itself. Reason: the spec is the documented interface; a specdefault:never sets the variable, but without itansible-doc -t roleshowsnull. Held: control, a CI check that spec defaults equaldefaults/main.yml(ansible-docsmith validateif it proves reliable, else a short pinned script: the one accepted exception to "no custom checker").Validation. Use the spec's cross-input keys (
required_if,mutually_exclusive,required_together,required_one_of) first; anassertintasks/validate.ymlonly for what the spec cannot express;main.ymlincludes it first withtags: always. Reason: fail before any change, and a--tagsrun cannot skip it. Held: review.Naming. Inputs are prefixed
<role>_; internal variables (vars/,set_fact,register:)__<role>_;noqaonly in test fixtures, with a reason on the line. Reason: no collisions across roles; the interface is visible by name (CoP, linux-system-roles). Held: control, ansible-lintvar-naming[no-role-prefix](production profile).README. Fixed, hand-written headings: Supported platforms; Requirements and run order; Role variables (table); Entry points (when several); Variables set by the role (when any); Tags; Example play; Tests; Notes, including an "Idempotent: yes/no" line. No licence or author heading: those are Collection-level. Reason: a consumer finds the same thing in the same place; generation adds a tool and cannot write the prose that explains a deliberate choice. Held: review.
Platforms.
meta/main.ymlplatforms, the README and the molecule platforms all list exactly Ubuntunoble(24.04) andresolute(26.04), neverall; every role passes on both. Reason: the hosts run 24.04 and 26.04 is the target; a declared platform nobody tests is a false claim. galaxy-importer ignoresplatformsfor collection roles, so the README and molecule are the real declaration. Held: molecule (control) for passing; review for the declarations matching.Check mode. Every scenario's
test_sequencerunscheckbefore converge (fresh host) and after it (configured host); molecule asserts only that it does not fail. Allowed guards:check_mode: falseon read-only probes,when: not ansible_check_mode. A role that cannot support check mode says why in README Notes and drops the step. Reason: check-mode breakage was the most frequent fix class in the environment it came from; CoP says roles must not fail in check mode. Held: control (molecule). Unverified: that molecule accepts the same step twice; if not, keep the before-converge run.Scenario. One
defaultscenario with converge, idempotence and verify. Verify asserts the runtime effect (the service loaded the config, systemd sees the drop-in), not only rendered files. Every validation has at least one negative test inverify.yml(or files it includes) as block/rescue/assert matching the expected error message, run last or failing before any change. Reason: a rendered file proves nothing about the host; a bare "it failed" passes for the wrong error. Held: idempotence by control; the rest by review.Complexity.
enable_list: [complexity]with the defaultmax_tasks(100), gated withwarn_list: []. Reason:max_taskscannot be set today: ansible-lint's config schema rejects the key (reproduced on 26.10.1; nearest upstream issue ansible/ansible-lint#4824), and experimental findings only warn unless the warn list is empty. Lower to 40 once that is fixed. This defers the number left open by Guiding principles for agents and humans. Held: control (ansible-lint, Lint job).Existing roles are brought into line now; none of these changes what a role does on a host. No ADR: each rule is cheap to reverse and carries its reason.
Where the rules are written down waits on Contributor doc set (recorded as implementation owed on the map).
Review of the map (2026-11-17).
Partly superseded by What a role's platform declaration means, and supported entry points: platforms follow the target hosts (Ubuntu targets declare
nobleandresolute, Proxmox targets declare Debiantrixie), and the same decision defines what a supported entry point is.Partly superseded by Role standard gaps found in review:
validate.ymlis loaded withimport_tasksandtags: alwaysbefore any task that changes the host. Anoqais allowed when it names one rule and carries a reason. ansible-lint holds the role prefix; review holds the__.Correction to the Validation rule. It says to use the spec's cross-input keys "first". On ansible-core 2.22.0
required_if,mutually_exclusive,required_togetherandrequired_one_ofare ignored when they sit next tooptionsunder an entry point (onlyoptionsreaches the validator,ansible/playbook/role/__init__.py:392), and ansible-lint 26.10.1 refuses them there withschema[role-arg-spec]. Reproduced with a scratch role. They work only inside a dict input, for its suboptions. The rule therefore reads:type,choicesandrequiredper input; a rule between two role variables is anassertintasks/validate.yml; the cross-input keys are used only inside a dict input's suboptions.No new decision is needed: the rule's own second half ("an
assert... only for what the spec cannot express") already leads here. Not certain whether a newer ansible-core adds entry-point support.Open after this review: whether output facts, handler names and internal roles are part of a role's interface (Role interface and semver: output facts, handler names, dropped platforms and internal roles).