test(roles): run molecule's check step before and after converge #134
Notifications
Due Date
No due date set.
Depends on
Reference: Mortis/Kamino#134
Reference in new issue
Block a user
Spec: Role standard, resolution comment, "Check mode".
What
scenario.test_sequence, addcheckbeforeconvergeand again after it: dependency, cleanup, syntax, create, prepare, check, converge, check, idempotence, side_effect, verify, cleanup, destroy.check_modescenario of_binary_update(roles/_binary_update/molecule/check_mode) is already check-only, has noconvergestep, and is left as it is.checkand record that in the PR.check_mode: falseon read-only probes andwhen: not ansible_check_mode.AGENTS.mdon the sequence that new scenarios copy. The rootAGENTS.mdreplacesCLAUDE.mdbefore this lands (#185 blocks this issue).Acceptance
Molecule passes for every role with the new sequence.
Order: this now waits on docs(agents): replace CLAUDE.md with a root AGENTS.md (#185): put the
CLAUDE.mdedits in the root or nestedAGENTS.mdinstead. (From Order of the implementation backlog, #198.)Review of the map (2026-11-15): corrections to this issue.
ufwalready detects check mode in a way the allowed-guard list does not include. The issue allows onlycheck_mode: falseon read-only probes andwhen: not ansible_check_mode.roles/ufw/README.md:57says the role detects check mode "with a skipped probe task, notansible_check_mode", and itsservice_rulesandorphan_rulesentry points depend on that. As written, an implementer would add guards on top of the probe or rewrite it. Change: add "ufwdetects check mode with a probe task: either keep it and record it as a third allowed guard (in this issue's PR and in the role rules), or replace it withansible_check_modeas its own change. Do not stack both."Review of the map (2026-11-17).
checkbefore converge runs on an image without the packages the role installs. Not tested. If a role then needs guards on most of its tasks, say so on this issue before adding them.ufwprobe in the comment of 2026-11-16 leaves a rule's content to the implementer. It is question 5 of Role interface and semver: output facts, handler names, dropped platforms and internal roles. The same ticket's question 6 answers thewarn_listeither-or on ci(lint): enable and gate ansible-lint's complexity rule.Decided by Role interface and semver: output facts, handler names, dropped platforms and internal roles (2026-11-20)
ufweither-or is settled: the allowed guards stay exactly two (check_mode: falseon read-only probes,when: not ansible_check_mode), and--checkis the supported preview. The ufw probe is replaced in refactor(roles): detect check mode only with ansible_check_mode. This issue does not touch the probe and adds no guard on top of it.checkstep runsansible-playbook --check, where both guards work.Final validation round, second pass (2026-11-20): body edited.
CLAUDE.mdline is now anAGENTS.mdline, noting that #185 blocks this issue (comment of 2026-11-15 folded in).check_modescenario of_binary_updateis already check-only, has noconvergestep, and is left as it is.The comments above stay as history.