elway: add handler blocks (tier 3 idempotency) #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to elway's tier 1 + tier 2 idempotency. A common Ansible pattern not yet supported:
Semantics
notify: <handler_name>(or a list). A handler with that name must exist.steps:phase completes, for each handler that was notified by a step that ended in statechanged, run it exactly once.ok/changed/failed/skipped— same reporting as regular steps.verify:so verification sees the final state.skippedorok, no notification fires even if thenotify:field is set.LOE
~50-80 LOC: playbook loader gets a
handlerssection;Stepgainsnotify: list[str];run_phaseflags notifications; main driver adds ahandlersphase afterstepsif any notifications accumulated.Why file separately
Not urgent — tier 1+2 covers the homelab deploy patterns we hit most. Handler semantics matter when multiple config changes should coalesce into one service restart; for a small fleet that's a rare pattern, but not non-zero.