Role standard was checked against the seven roles and against public practice. Most of it held. Decide the rest:
The __<role>_ rule for internal variables is said to be held by var-naming[no-role-prefix]. The lint passes un-underscored internals too; only a name with no role prefix fails. Is the __ part held by review, or dropped?
"Validate first, before any change": fail2ban installs packages before it validates, and ufw runs install, sysctl and aggregate first. Moving validation changes task order, which the standard says must not change host behaviour. Move it, or word the rule to match?
Three rules have no issue: noqa only in test fixtures, verify checks the effect on the host, the role applies suboption defaults itself.
Rules a consumer relies on that the standard does not state: renaming an input is a breaking release with no alias, and a role never creates or stores secrets. Add both?
The semver mapping leaves out major_changes, deprecated_features, security_fixes and known_issues, which the changelog config has, and has no deprecate-before-remove step. Release automation derives the version from this mapping.
Architecture gap: nothing decides on plugins against roles only, dependencies between roles, or adding a Collection dependency. Decide, or name it out of scope.
From the review
Amends, depending on the answer: the validation and naming issue (#137), the spec defaults issue (#135), the roles/AGENTS.md issue (#181), the README issue (#190), the map's gist for Role standard (it calls the spec-defaults check the one custom-checker exception; two more custom checks were decided later).
Part of #87
## Question
[Role standard](https://git.rkdr.net/Mortis/Kamino/issues/93) was checked against the seven roles and against public practice. Most of it held. Decide the rest:
- The `__<role>_` rule for internal variables is said to be held by `var-naming[no-role-prefix]`. The lint passes un-underscored internals too; only a name with no role prefix fails. Is the `__` part held by review, or dropped?
- "Validate first, before any change": `fail2ban` installs packages before it validates, and `ufw` runs install, sysctl and aggregate first. Moving validation changes task order, which the standard says must not change host behaviour. Move it, or word the rule to match?
- Three rules have no issue: `noqa` only in test fixtures, verify checks the effect on the host, the role applies suboption defaults itself.
- Rules a consumer relies on that the standard does not state: renaming an input is a breaking release with no alias, and a role never creates or stores secrets. Add both?
- The semver mapping leaves out `major_changes`, `deprecated_features`, `security_fixes` and `known_issues`, which the changelog config has, and has no deprecate-before-remove step. Release automation derives the version from this mapping.
- Architecture gap: nothing decides on plugins against roles only, dependencies between roles, or adding a Collection dependency. Decide, or name it out of scope.
## From the review
- Amends, depending on the answer: the validation and naming issue (#137), the spec defaults issue (#135), the `roles/AGENTS.md` issue (#181), the README issue (#190), the map's gist for Role standard (it calls the spec-defaults check the one custom-checker exception; two more custom checks were decided later).
Evidence from the review of the map (2026-11-15). Lint results come from ansible-lint 26.10.1 and ansible-core 2.22.0 (the repository's pins) run on a throwaway role.
The __<role>_ prefix
Role standard: "Held: control, ansible-lint var-naming[no-role-prefix] (production profile)".
Observed: __foo_internal (set_fact), __foo_res (register) and __foo_c (vars/) pass. So do foo_res2 as a register and foo_d in vars/. Only names with no role prefix (bar_bad, baz) fail. The rule docs say "Underlines are accepted before the prefix".
roles/ufw/vars/main.yml holds ufw_package_name, a constant the standard calls internal.
Options seen: say "held by review" for __, or add a small pinned hook (the principles prefer a tool). Confidence high.
Validate first
The standard: main.yml includes validate.yml "first with tags: always. Reason: fail before any change, and a --tags run cannot skip it."
roles/fail2ban/tasks/main.yml:3-8 imports install.yml before validate.yml, tagged [fail2ban, fail2ban_validate]. roles/ufw/tasks/main.yml:23-36 runs install, sysctl and aggregate before validate, tagged [ufw, ufw_validate]. Today a bad ufw_* value fails after packages and sysctl changed.
The validation issue only adds tags: always; it does not move validation. Moving it changes task order, which the standard says the cleanup must not do to a host.
Tag inheritance differs: on import_tasks, always reaches every imported task; on include_tasks (roles/sshd/tasks/main.yml:3) it applies to the include only (Ansible's documented tag rules). The standard does not distinguish.
Option seen: move validate.yml first in both roles, after checking its inputs do not depend on install side effects.
Rules with no issue
"noqa only in test fixtures": roles/sshd/tasks/main.yml:14 and roles/systemd_hardening/tasks/main.yml:27 carry noqa; no issue removes them.
"Verify asserts the runtime effect, not only rendered files": no issue. Each role's verify.yml was not audited.
Option seen: add the first two to the validation issue and the third to the spec-defaults issue. Confidence medium.
Renamed inputs and secrets
The standard covers prefixes but not rename policy or secrets. A known consumer relies on two conventions: a renamed or removed input is a breaking release with no compatibility alias, and a role never creates or stores a secret.
Six of seven READMEs state "no_log is not used: the role handles no secrets" (sshd does not say), so the second rule matches the roles today.
Contributor doc set: "Major (breaking_changes, removed_features) ... Minor: a new role, variable, option or platform. Patch: a bugfix."
The sections list in changelogs/config.yaml also defines major_changes, deprecated_features, security_fixes and known_issues. Release automation derives the version from sections, so an unmapped section has no defined bump.
The collection requirements: "new features and deprecations in minor", removals only in major, and a public deprecation policy.
Plugins, role dependencies, Collection dependencies
No decision says whether the Collection accepts plugins or only roles, whether roles may depend on each other (meta/main.ymldependencies), or what justifies a new Collection dependency. galaxy.yml:23-25 already depends on community.general and ansible.posix.
A contributor's agent proposing a filter plugin or a cross-role dependency finds no answer. Option seen: decide, or name it out of scope in the map. Confidence low to medium.
Evidence from the review of the map (2026-11-15). Lint results come from ansible-lint 26.10.1 and ansible-core 2.22.0 (the repository's pins) run on a throwaway role.
### The `__<role>_` prefix
- [Role standard](https://git.rkdr.net/Mortis/Kamino/issues/93): "Held: control, ansible-lint var-naming[no-role-prefix] (production profile)".
- Observed: `__foo_internal` (`set_fact`), `__foo_res` (`register`) and `__foo_c` (`vars/`) pass. So do `foo_res2` as a register and `foo_d` in `vars/`. Only names with no role prefix (`bar_bad`, `baz`) fail. The [rule docs](https://docs.ansible.com/projects/lint/rules/var-naming/) say "Underlines are accepted before the prefix".
- So lint holds the prefix, not the `__` distinction. After [refactor(roles): validate through spec keys and validate.yml, and prefix internal variables with __ROLE_](https://git.rkdr.net/Mortis/Kamino/issues/137) lands, nothing stops a new `register: ufw_x`.
- `roles/ufw/vars/main.yml` holds `ufw_package_name`, a constant the standard calls internal.
- Options seen: say "held by review" for `__`, or add a small pinned hook (the principles prefer a tool). Confidence high.
### Validate first
- The standard: `main.yml` includes `validate.yml` "first with `tags: always`. Reason: fail before any change, and a `--tags` run cannot skip it."
- `roles/fail2ban/tasks/main.yml:3-8` imports `install.yml` before `validate.yml`, tagged `[fail2ban, fail2ban_validate]`. `roles/ufw/tasks/main.yml:23-36` runs install, sysctl and aggregate before validate, tagged `[ufw, ufw_validate]`. Today a bad `ufw_*` value fails after packages and sysctl changed.
- The validation issue only adds `tags: always`; it does not move validation. Moving it changes task order, which the standard says the cleanup must not do to a host.
- Tag inheritance differs: on `import_tasks`, `always` reaches every imported task; on `include_tasks` (`roles/sshd/tasks/main.yml:3`) it applies to the include only (Ansible's documented tag rules). The standard does not distinguish.
- Option seen: move `validate.yml` first in both roles, after checking its inputs do not depend on install side effects.
### Rules with no issue
- "`noqa` only in test fixtures": `roles/sshd/tasks/main.yml:14` and `roles/systemd_hardening/tasks/main.yml:27` carry `noqa`; no issue removes them.
- "Verify asserts the runtime effect, not only rendered files": no issue. Each role's `verify.yml` was not audited.
- "Suboption defaults are documentation only, so the role applies them itself": not in [ci(roles): repeat defaults in argument_specs and fail when they drift from defaults/main.yml](https://git.rkdr.net/Mortis/Kamino/issues/135).
- Option seen: add the first two to the validation issue and the third to the spec-defaults issue. Confidence medium.
### Renamed inputs and secrets
- The standard covers prefixes but not rename policy or secrets. A known consumer relies on two conventions: a renamed or removed input is a breaking release with no compatibility alias, and a role never creates or stores a secret.
- Six of seven READMEs state "`no_log` is not used: the role handles no secrets" (`sshd` does not say), so the second rule matches the roles today.
- Option seen: state both in `roles/AGENTS.md` ([docs(agents): write roles/AGENTS.md with the role rules](https://git.rkdr.net/Mortis/Kamino/issues/181)). Confidence medium.
### Semver mapping
- [Contributor doc set](https://git.rkdr.net/Mortis/Kamino/issues/103): "Major (breaking_changes, removed_features) ... Minor: a new role, variable, option or platform. Patch: a bugfix."
- The `sections` list in `changelogs/config.yaml` also defines `major_changes`, `deprecated_features`, `security_fixes` and `known_issues`. Release automation derives the version from sections, so an unmapped section has no defined bump.
- The [collection requirements](https://docs.ansible.com/ansible/latest/community/collection_contributors/collection_requirements.html): "new features and deprecations in minor", removals only in major, and a public deprecation policy.
- Option seen: map every section; add deprecate-before-remove, or state that inputs are removed without deprecation as a deliberate deviation. Coordinate with [ci: check the release version against its fragments and limit what a release/ branch may change](https://git.rkdr.net/Mortis/Kamino/issues/176).
### Plugins, role dependencies, Collection dependencies
- No decision says whether the Collection accepts plugins or only roles, whether roles may depend on each other (`meta/main.yml` `dependencies`), or what justifies a new Collection dependency. `galaxy.yml:23-25` already depends on `community.general` and `ansible.posix`.
- A contributor's agent proposing a filter plugin or a cross-role dependency finds no answer. Option seen: decide, or name it out of scope in the map. Confidence low to medium.
Decided with the maintainer on 2026-11-17. Facts checked against the code: neither validate.yml depends on install or sysctl changes (ufw's reads only ufw_aggregated_rules, built by set_fact); four noqa sit in role tasks, three of them on the connection variable ansible_ssh_user; user_management takes a vaulted password hash and sshd manages host keys; no plugins/, every role has dependencies: [].
Each rule is written as the rule, its reason and how it is held.
Internal variables are __<role>_. Reason: it is the published convention (Red Hat Automation Good Practices §4.1.4, "internal variables ... are to be prefixed by two underscores"), and it tells an input from an internal name, which rule 6 needs. Held: ansible-lint var-naming[no-role-prefix] for the prefix, review for the __. vars/ constants such as ufw_package_name count as internal.
Validation runs before any task that changes the host.validate.yml is loaded with import_tasks and tags: always; only tasks that compute facts (set_fact, read-only probes) may run before it, and they carry always too. Reason: a bad input fails before any change, and always on include_tasks does not reach the included tasks. Held: review. fail2ban moves validate before install; ufw becomes stray-guard → aggregate → validate → install → sysctl → …; sshd moves from include_tasks to import_tasks. A valid run does the same to the host; a bugfixes fragment says that a bad input now fails earlier.
Prefer fixing a lint finding over noqa; a noqa that remains names one rule and carries a reason comment. Reason: an unexplained exception cannot be reviewed. Held: review. No hook, no .ansible-lint-ignore move.
Verify asserts the effect on the host, not only rendered files. Reason: a rendered file proves nothing about a running service. Held: review; one audit issue.
A role applies suboption defaults itself; argument_specs suboption defaults are documentation. Reason: Ansible does not apply them. Held: the spec-defaults drift check where it can see them, review otherwise.
Renaming or removing an input (a variable without __) is a breaking_changes fragment and a major release, with no compatibility alias. Reason: latest-only support with one known consumer makes an alias cost more than it gives. Held: review, plus the fragment check.
A secret never lands in plaintext in the repository, a role's defaults, task output or a file on the controller; every task that carries one sets no_log: true; a secret a role needs is a required input with no default, from the consumer's secret store; a role may generate a secret only by writing it straight to a secret store the consumer names. Reason: leaves room for a future role that writes to SOPS, Vault or OpenBao without leaking anything today. Keys a host generates for itself and that stay there (SSH host keys) are not covered. Held: review. The README line "no_log is not used: the role handles no secrets" stays only where it is true.
Every changelog section maps to a bump. Major: breaking_changes, removed_features. Minor: minor_changes, deprecated_features. Patch: bugfixes, security_fixes, known_issues. major_changes is not used (its fragments go to breaking_changes or minor_changes), because its title collides with a major release. Inputs are removed without a deprecation period, a stated deviation from the collection requirements; deprecated_features stays for an optional notice, and the removed_features title drops "previously deprecated". Held: the release version check and the fragment check.
The Collection holds roles only. A plugin needs an ADR first (it brings Python tests, sanity scope and the core matrix). Held: review.
A new Collection dependency states its reason in the pull request and has a version floor. Held: review, galaxy.yml under CODEOWNERS.
A role may depend on another role of this Collection, only through ansible.builtin.include_role or import_role by FQCN in its tasks, only on a supported entry point of that role, never on a role outside the Collection, and its README lists the dependency. meta/main.ymldependencies stays []. Reason: a task-level include keeps the order readable where meta dependencies run hidden and deduplicated; the next migration wave may bring dependent roles, converted on extraction. Held: a Lint check for empty meta dependencies, and the scenario selector runs a dependent role's scenarios when a role it depends on changes.
No ADR: every item is cheap to reverse.
Backlog: scope added to #137, #135, #181, #176, #190; new issues filed for the verify.yml audit and for role dependencies in Lint and the scenario selector.
## Resolution
Decided with the maintainer on 2026-11-17. Facts checked against the code: neither `validate.yml` depends on install or sysctl changes (ufw's reads only `ufw_aggregated_rules`, built by `set_fact`); four `noqa` sit in role tasks, three of them on the connection variable `ansible_ssh_user`; `user_management` takes a vaulted password hash and `sshd` manages host keys; no `plugins/`, every role has `dependencies: []`.
Each rule is written as the rule, its reason and how it is held.
1. **Internal variables are `__<role>_`.** Reason: it is the published convention (Red Hat Automation Good Practices §4.1.4, "internal variables ... are to be prefixed by two underscores"), and it tells an input from an internal name, which rule 6 needs. Held: ansible-lint `var-naming[no-role-prefix]` for the prefix, review for the `__`. `vars/` constants such as `ufw_package_name` count as internal.
2. **Validation runs before any task that changes the host.** `validate.yml` is loaded with `import_tasks` and `tags: always`; only tasks that compute facts (`set_fact`, read-only probes) may run before it, and they carry `always` too. Reason: a bad input fails before any change, and `always` on `include_tasks` does not reach the included tasks. Held: review. fail2ban moves validate before install; ufw becomes stray-guard → aggregate → validate → install → sysctl → …; sshd moves from `include_tasks` to `import_tasks`. A valid run does the same to the host; a `bugfixes` fragment says that a bad input now fails earlier.
3. **Prefer fixing a lint finding over `noqa`; a `noqa` that remains names one rule and carries a reason comment.** Reason: an unexplained exception cannot be reviewed. Held: review. No hook, no `.ansible-lint-ignore` move.
4. **Verify asserts the effect on the host, not only rendered files.** Reason: a rendered file proves nothing about a running service. Held: review; one audit issue.
5. **A role applies suboption defaults itself; `argument_specs` suboption defaults are documentation.** Reason: Ansible does not apply them. Held: the spec-defaults drift check where it can see them, review otherwise.
6. **Renaming or removing an input (a variable without `__`) is a `breaking_changes` fragment and a major release, with no compatibility alias.** Reason: latest-only support with one known consumer makes an alias cost more than it gives. Held: review, plus the fragment check.
7. **A secret never lands in plaintext in the repository, a role's defaults, task output or a file on the controller; every task that carries one sets `no_log: true`; a secret a role needs is a required input with no default, from the consumer's secret store; a role may generate a secret only by writing it straight to a secret store the consumer names.** Reason: leaves room for a future role that writes to SOPS, Vault or OpenBao without leaking anything today. Keys a host generates for itself and that stay there (SSH host keys) are not covered. Held: review. The README line "`no_log` is not used: the role handles no secrets" stays only where it is true.
8. **Every changelog section maps to a bump.** Major: `breaking_changes`, `removed_features`. Minor: `minor_changes`, `deprecated_features`. Patch: `bugfixes`, `security_fixes`, `known_issues`. `major_changes` is not used (its fragments go to `breaking_changes` or `minor_changes`), because its title collides with a major release. Inputs are removed without a deprecation period, a stated deviation from the collection requirements; `deprecated_features` stays for an optional notice, and the `removed_features` title drops "previously deprecated". Held: the release version check and the fragment check.
9. **The Collection holds roles only.** A plugin needs an ADR first (it brings Python tests, sanity scope and the core matrix). Held: review.
10. **A new Collection dependency** states its reason in the pull request and has a version floor. Held: review, `galaxy.yml` under CODEOWNERS.
11. **A role may depend on another role of this Collection**, only through `ansible.builtin.include_role` or `import_role` by FQCN in its tasks, only on a supported entry point of that role, never on a role outside the Collection, and its README lists the dependency. `meta/main.yml` `dependencies` stays `[]`. Reason: a task-level include keeps the order readable where `meta` dependencies run hidden and deduplicated; the next migration wave may bring dependent roles, converted on extraction. Held: a Lint check for empty `meta` dependencies, and the scenario selector runs a dependent role's scenarios when a role it depends on changes.
12. **No ADR**: every item is cheap to reverse.
Backlog: scope added to #137, #135, #181, #176, #190; new issues filed for the `verify.yml` audit and for role dependencies in Lint and the scenario selector.
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
Role standard was checked against the seven roles and against public practice. Most of it held. Decide the rest:
__<role>_rule for internal variables is said to be held byvar-naming[no-role-prefix]. The lint passes un-underscored internals too; only a name with no role prefix fails. Is the__part held by review, or dropped?fail2baninstalls packages before it validates, andufwruns install, sysctl and aggregate first. Moving validation changes task order, which the standard says must not change host behaviour. Move it, or word the rule to match?noqaonly in test fixtures, verify checks the effect on the host, the role applies suboption defaults itself.major_changes,deprecated_features,security_fixesandknown_issues, which the changelog config has, and has no deprecate-before-remove step. Release automation derives the version from this mapping.From the review
roles/AGENTS.mdissue (#181), the README issue (#190), the map's gist for Role standard (it calls the spec-defaults check the one custom-checker exception; two more custom checks were decided later).Evidence from the review of the map (2026-11-15). Lint results come from ansible-lint 26.10.1 and ansible-core 2.22.0 (the repository's pins) run on a throwaway role.
The
__<role>_prefix__foo_internal(set_fact),__foo_res(register) and__foo_c(vars/) pass. So dofoo_res2as a register andfoo_dinvars/. Only names with no role prefix (bar_bad,baz) fail. The rule docs say "Underlines are accepted before the prefix".__distinction. After refactor(roles): validate through spec keys and validate.yml, and prefix internal variables with _ROLE lands, nothing stops a newregister: ufw_x.roles/ufw/vars/main.ymlholdsufw_package_name, a constant the standard calls internal.__, or add a small pinned hook (the principles prefer a tool). Confidence high.Validate first
main.ymlincludesvalidate.yml"first withtags: always. Reason: fail before any change, and a--tagsrun cannot skip it."roles/fail2ban/tasks/main.yml:3-8importsinstall.ymlbeforevalidate.yml, tagged[fail2ban, fail2ban_validate].roles/ufw/tasks/main.yml:23-36runs install, sysctl and aggregate before validate, tagged[ufw, ufw_validate]. Today a badufw_*value fails after packages and sysctl changed.tags: always; it does not move validation. Moving it changes task order, which the standard says the cleanup must not do to a host.import_tasks,alwaysreaches every imported task; oninclude_tasks(roles/sshd/tasks/main.yml:3) it applies to the include only (Ansible's documented tag rules). The standard does not distinguish.validate.ymlfirst in both roles, after checking its inputs do not depend on install side effects.Rules with no issue
noqaonly in test fixtures":roles/sshd/tasks/main.yml:14androles/systemd_hardening/tasks/main.yml:27carrynoqa; no issue removes them.verify.ymlwas not audited.Renamed inputs and secrets
no_logis not used: the role handles no secrets" (sshddoes not say), so the second rule matches the roles today.roles/AGENTS.md(docs(agents): write roles/AGENTS.md with the role rules). Confidence medium.Semver mapping
sectionslist inchangelogs/config.yamlalso definesmajor_changes,deprecated_features,security_fixesandknown_issues. Release automation derives the version from sections, so an unmapped section has no defined bump.Plugins, role dependencies, Collection dependencies
meta/main.ymldependencies), or what justifies a new Collection dependency.galaxy.yml:23-25already depends oncommunity.generalandansible.posix.Resolution
Decided with the maintainer on 2026-11-17. Facts checked against the code: neither
validate.ymldepends on install or sysctl changes (ufw's reads onlyufw_aggregated_rules, built byset_fact); fournoqasit in role tasks, three of them on the connection variableansible_ssh_user;user_managementtakes a vaulted password hash andsshdmanages host keys; noplugins/, every role hasdependencies: [].Each rule is written as the rule, its reason and how it is held.
__<role>_. Reason: it is the published convention (Red Hat Automation Good Practices §4.1.4, "internal variables ... are to be prefixed by two underscores"), and it tells an input from an internal name, which rule 6 needs. Held: ansible-lintvar-naming[no-role-prefix]for the prefix, review for the__.vars/constants such asufw_package_namecount as internal.validate.ymlis loaded withimport_tasksandtags: always; only tasks that compute facts (set_fact, read-only probes) may run before it, and they carryalwaystoo. Reason: a bad input fails before any change, andalwaysoninclude_tasksdoes not reach the included tasks. Held: review. fail2ban moves validate before install; ufw becomes stray-guard → aggregate → validate → install → sysctl → …; sshd moves frominclude_taskstoimport_tasks. A valid run does the same to the host; abugfixesfragment says that a bad input now fails earlier.noqa; anoqathat remains names one rule and carries a reason comment. Reason: an unexplained exception cannot be reviewed. Held: review. No hook, no.ansible-lint-ignoremove.argument_specssuboption defaults are documentation. Reason: Ansible does not apply them. Held: the spec-defaults drift check where it can see them, review otherwise.__) is abreaking_changesfragment and a major release, with no compatibility alias. Reason: latest-only support with one known consumer makes an alias cost more than it gives. Held: review, plus the fragment check.no_log: true; a secret a role needs is a required input with no default, from the consumer's secret store; a role may generate a secret only by writing it straight to a secret store the consumer names. Reason: leaves room for a future role that writes to SOPS, Vault or OpenBao without leaking anything today. Keys a host generates for itself and that stay there (SSH host keys) are not covered. Held: review. The README line "no_logis not used: the role handles no secrets" stays only where it is true.breaking_changes,removed_features. Minor:minor_changes,deprecated_features. Patch:bugfixes,security_fixes,known_issues.major_changesis not used (its fragments go tobreaking_changesorminor_changes), because its title collides with a major release. Inputs are removed without a deprecation period, a stated deviation from the collection requirements;deprecated_featuresstays for an optional notice, and theremoved_featurestitle drops "previously deprecated". Held: the release version check and the fragment check.galaxy.ymlunder CODEOWNERS.ansible.builtin.include_roleorimport_roleby FQCN in its tasks, only on a supported entry point of that role, never on a role outside the Collection, and its README lists the dependency.meta/main.ymldependenciesstays[]. Reason: a task-level include keeps the order readable wheremetadependencies run hidden and deduplicated; the next migration wave may bring dependent roles, converted on extraction. Held: a Lint check for emptymetadependencies, and the scenario selector runs a dependent role's scenarios when a role it depends on changes.Backlog: scope added to #137, #135, #181, #176, #190; new issues filed for the
verify.ymlaudit and for role dependencies in Lint and the scenario selector.