Use this when a run finds nothing to change.
No-op
A no-op is a run that finds everything already in the desired state and changes nothing, reported as ok or unchanged. Frequent no-op runs are the sign of healthy idempotent automation.
1. No-op runs must not change anything or restart services.
2. Report changed=false.
3. Fast.
4. Handlers not triggered.
5. Proves idempotency.
state correct → no-op → changed=false
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as ambiguous target identity, stale inputs, partial success, unsafe retry, permission drift and confusing tool completion with target-evidence of the actual state, choosing the cases most relevant to explicit detection that desired and actual state already match, zero mutation as success, and output that shows why no action was required.
Step 2 Common mistakes Narrow the fault
- Tasks that always report changed.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- A no-op run changes nothing.
- It is the sign of healthy idempotent automation.
- Unexpected changes on rerun need investigation.
- changed=false when nothing to do — reporting
- No side effects on no-op — safety
- Fast no-op runs — efficiency
ReferenceWhy it matters1 section · depth on demand
What it is
A no-op run changes nothing because the system already matches; reporting changed=0 shows idempotency.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
A no-op ("no operation") is the correct result of an idempotent run when everything is already in the desired state: nothing changes, and the tool reports that clearly. No-op runs are valuable evidence — they show that the system matches its definition — and an unexpected change in a run that should be a no-op is an early sign of drift or a non-idempotent step.
Make no-ops visible:
PLAY RECAP
sw01 : ok=14 changed=0 unreachable=0 failed=0
Terraform: No changes. Your infrastructure matches the configuration.
Documented example, not captured output. In CI, a scheduled plan or check run that reports zero changes can pass silently, while any change raises an alert for review.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Idempotency > No-op. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For explicit detection that desired and actual state already match, zero mutation as success, and output that shows why no action was required, prefer typed fields and stable IDs over human presentation text.