Role interface and semver: output facts, handler names, dropped platforms and internal roles #257
Notifications
Due Date
No due date set.
Blocks
Reference: Mortis/Kamino#257
Reference in new issue
Block a user
Part of #87
The role standard says what an input is and that renaming one is a major release. It does not say whether the other things a consumer can depend on are part of the interface.
To decide
<role>_and renaming it is abreaking_changesfragment. Three exist today:system_baseline_reboot_required,user_management_all_users,user_management_managed_usernames.jammy, Ubuntuall, Debianall) abreaking_changesfragment, like the 2.19 floor? If yes, should it ship in the same major as the floor raise? Does the interim removal oftrixiefrom four roles, until the Debian image exists, need a fragment at all?role-name. The README Roadmap already announces one.ufwprobe task a third allowed guard, or is it replaced byansible_check_mode?warn_list: does enablingcomplexitykeepjinja[spacing]andfqcn[deep]as warnings, or do they become failures?Waits on this
Blocked by this ticket: refactor(roles): validate through spec keys and validate.yml, and prefix internal variables with _ROLE (question 1) and test(roles): run every role scenario on 24.04 and 26.04 and declare exactly those platforms (question 3). Questions 5 and 6 are answered by a comment on the check-step and complexity issues.
Evidence is in the first comment.
Evidence from the review of the map (2026-11-17)
Output facts and handler names
vars/,set_fact,register:)__<role>_", and the README heading "Variables set by the role (when any)".<role>_to__<role>_in every role" and "No role changes what it does on a host."roles/system_baseline/README.md:62: the factsystem_baseline_reboot_required, "so read it withdefault(false)".roles/user_management/README.md:58: "The role sets the factsuser_management_all_users... anduser_management_managed_usernames."__)" only.Dropped platforms
jammyand Ubuntuallare dropped everywhere." Supported and tested ansible-core versions, item 3: "Every floor raise is a major release, this first one included." The README issue lists "dropping an Ubuntu release" under Major.jammyin sshd, system_baseline, systemd_hardening, ufw and user_management; Ubuntuallin docker; Debianallin network_interfaces.Internal roles
README.md:43: "Wave 2:_binary_update(internal shared binary-update logic, called only by Collection roles; ships withtraefik)". ansible-lint 26.10.1: "role-name: Role name _binary_update does not match^[a-z][a-z0-9_]*$pattern."The two either-or lines
ansible_check_modeas its own change."warn_list: [jinja[spacing], fqcn[deep]]... or state that promoting both is intended."Resolution (2026-11-20)
Facts checked first (scratch copy, repository unchanged):
_binary_updateshipped in 1.8.0: argument_specs, a README opening "Internal role … its interface can change in any release, without a major version", two Molecule scenarios, a guard that refuses to run without a parent role, called bytraefikwith an FQCNinclude_role.role-nameis skipped repository-wide in.ansible-lint.check_mode: trueleavesansible_check_modeFalse, insideinclude_roleand in the play's own tasks; the ufw probe is skipped either way._binary_update,traefikanduser_managementguard withansible_check_mode.warn_list: [],complexityenabled and therole-nameskip removed, the only new ansible-lint finding isrole-nameonroles/_binary_update; there are nojinja[spacing],fqcn[deep]orcomplexityfindings. A lineroles/_binary_update role-namein.ansible-lint-ignoremakes that run pass.Decisions
system_baseline_reboot_required,user_management_all_users,user_management_managed_usernames) keeps<role>_; renaming or removing one isbreaking_changes. Every other fact or registered variable is__<role>_. Held by review.## Tagssection: renaming or removing it isbreaking_changes, adding one isminor_changes. An unlisted tag is internal. Held by review.breaking_changes, tested or not (jammyin five roles, Ubuntuallin docker, Debianallin network_interfaces). These removals ship in the same major as the ansible-core floor raise (2.0.0): the maintainer leaves the release pull request unmerged until both have landed (aspirational). Held by a control: the fragment-presence check fails when a declared platform disappears without abreaking_changesfragment.trixie. The platforms issue leaves it declared; the Debian 13 image makes the declaration true. Accepted:trixieis declared but untested until then, as it is today._binary_updatepattern: a leading_marks one; only roles of this Collection call it, by FQCN; it refuses to run without a parent role (control); it has argument_specs, a README opening with the internal-role statement, Molecule scenarios and the platform rule; no row in the README's role table, one line under it naming internal roles. Its interface is outside semver: a change confined to it takes atrivialfragment, and the calling role writes the fragment for any effect a consumer can see. Rule 11 is extended: a role calls a public role only on a supported entry point, an internal role on any entry point in its argument_specs.role-nameis exempted per internal role:roles/_binary_update role-namein.ansible-lint-ignorereplaces the repository-wide skip, so a misnamed public role fails. Each new internal role adds its own line, reviewed.__split in an internal role. All its variables keep_<role>_(today_binary_update_*); its inputs are known from argument_specs.check_mode: falseon read-only probes andwhen: not ansible_check_mode;--checkis the supported preview, and each role README says a play-levelcheck_mode: trueis not supported. The ufw probe is replaced in its own change.warn_list: []. It promotes nothing today. A future experimental rule that fires fails its Renovate pull request, which then does not automerge.__marker are held by review; rule 4 by control once the fragment check is extended.No ADR: none of these is hard to reverse, and none would surprise a reader who has the rule.
Backlog