ci(roles): repeat defaults in argument_specs and fail when they drift from defaults/main.yml #135
Notifications
Due Date
No due date set.
Blocks
Depends on
Reference: Mortis/Kamino#135
Reference in new issue
Block a user
Spec: Role standard, resolution comment, "Interface (argument_specs)".
What
defaults/main.ymland inmeta/argument_specs.yml, withtype,descriptionand adefault:equal to the value in defaults. Usechoiceswhere the value set is closed.required: trueinputs have no entry in defaults.system_baseline's profile-derived defaults andsystemd_hardening's_disable_services_extra/_disable_services_effectiveare missing from their specs. Variables that are internal are renamed__<role>_and moved out of defaults. That rename is covered by the validation and naming issue, so coordinate with it.defaults/main.ymldisagree. Tryansible-docsmith validatefirst: pin it, run it as a pre-commit hook, and check that it compares values correctly. If it is not reliable, write a short pinned script instead and say why in the PR.Acceptance
ansible-doc -t roleshows the real default for every optional input.Review of the map (2026-11-15): corrections to this issue.
.pre-commit-config.yamlandrequirements-dev.txtare inputs of theciimage, so this change rebuilds the image. The issue does not say so.Note from What a role's platform declaration means, and supported entry points: the drift check this issue builds will later also compare argument_specs keys, README "Entry points" items and
tasks/<key>.yml. That extension is in test(roles): give every supported entry point a spec key, a README entry and a Molecule test, which is blocked by this issue. Nothing changes here, but structure the check so that a second comparison fits.Scope added by Role standard gaps found in review (resolution comment, rule 5): suboption defaults in
argument_specsare documentation only, because Ansible does not apply them, so the role applies them itself (default()orcombine()in its code). Where the drift check can compare a suboption default with what the role applies cheaply, it does; otherwise the rule is held by review and the check says so in its header.