ci(lint): enable and gate ansible-lint's complexity rule #138
Notifications
Due Date
No due date set.
Blocks
Reference: Mortis/Kamino#138
Reference in new issue
Block a user
Spec: Role standard, resolution comment, "Complexity".
What
In
.ansible-lint, addenable_list: [complexity]andwarn_list: []. With an empty warn list, findings from experimental rules fail Lint. Keep the defaultmax_tasks(100): the key cannot be set, because ansible-lint's config schema rejects it (reproduced on 26.10.1; see the separate issue to lower it). Add a one-line comment with the reason.Acceptance
Lint passes on main. A throwaway task file with 101 tasks fails Lint locally (do not commit it).
Review of the map (2026-11-15): corrections to this issue.
warn_list: []promotes more than experimental rules. The issue says "With an empty warn list, findings from experimental rules fail Lint." ansible-lint's default warn list (26.10.1,config.pyDEFAULT_WARN_LIST) isexperimental,jinja[spacing]andfqcn[deep]. An empty list also makesjinja[spacing]andfqcn[deep]findings fatal, which is a change no decision asked for. An implementer may then "fix" it with scatterednoqa. Change: either setwarn_list: [jinja[spacing], fqcn[deep]](keeps today's behaviour and gates only the experimental rules,complexityamong them), or state that promoting both is intended. In both cases, run the repository's real Lint with the change on a branch, and list in the PR every new finding it reports.roles/(molecule files included)", which is also the input the follow-up that lowers the limit to 40 needs.Decided by Role interface and semver: output facts, handler names, dropped platforms and internal roles (2026-11-20)
warn_list: []: promotingjinja[spacing]andfqcn[deep]is intended. On a scratch copy (2026-11-20) withwarn_list: []andcomplexityenabled there were no findings of either rule or ofcomplexity, so Lint stays green.role-namefromskip_listand addroles/_binary_update role-nameto.ansible-lint-ignore, moving the explaining comment with it, so a misnamed public role fails. Tested on the same copy: Lint passes with that line.