Pcornel
Automation · Idempotency

Repeated Execution

Cheat sheet · https://pcornel.dk/topic.php?topic=6002

Back to the Topic

Answer

Repeated execution means automation can safely run again after a failure, on a schedule or by mistake, because idempotent steps skip work that is already done.

Remember

  • Jobs may run again after failure, on schedule or by mistake.
  • Idempotent steps skip completed work.
  • Reruns must not duplicate resources.

First checks

  • ansible-playbook site.yml; ansible-playbook site.yml — repeat
  • Scheduled re-runs for enforcement — drift correction
  • Results stable across runs — determinism

Verify in this order

run → rerun → stable results

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6002

Confirmation

Confirm action

Continue?