Use this when defining what a job returns.
Outputs · Automation Design
Outputs are what an automation job returns — results, created IDs, reports, logs and exit status — in a predictable format, often JSON, so other jobs and people can use them.
1. Outputs: results, reports, artifacts, exit codes.
2. Machine-readable (JSON) plus human summary.
3. Consistent schema.
4. Store artifacts.
5. Clear success/failure signals.
automation → structured output + exit code
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 implicit defaults, hidden dependencies, duplicate dispatch, worker drift, timeout without cancellation, retries against non-idempotent operations and confusing control-plane completion with target convergence, choosing the cases most relevant to named/typed outputs, producer/consumer contract, redaction, persistence scope and proving the output refers to the intended target revision.
Step 2 Common mistakes Narrow the fault
- Only printing human text that cannot be parsed.
- Leaking secrets in outputs and logs.
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.
- Outputs should be predictable and machine-readable, often JSON.
- Return IDs of anything created so callers can use them.
- Exit codes tell schedulers and pipelines the result.
- Output format (JSON/report) — contract
- Exit codes — success/failure
- Artifacts stored — results
ReferenceWhy it matters1 section · depth on demand
What it is
Outputs are what an automation run returns: created resource IDs, changed objects, summary counts and logs. Structured outputs (JSON) let the next step or another tool consume them reliably.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Outputs are what an automation returns: status, created resource IDs, reports, logs, files. Designing outputs deliberately makes automations composable — the next step in a workflow, a dashboard or a person can use the result without parsing free text.
Good output design:
- Machine-readable results (JSON) alongside human-readable summaries.
- Stable field names; treat changes as breaking.
- Exit codes that distinguish success, partial failure and errors.
- No secrets in outputs or logs.
result = {"status": "partial", "succeeded": ["sw01", "sw02"], "failed": {"sw03": "timeout"}}
print(json.dumps(result))
sys.exit(0 if not result["failed"] else 3)
Example
terraform output -json
ansible-playbook site.yml -e @vars.yml | tee run.log
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 Automation Design > Outputs. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/well-architected/operational-excellence/enable-automation · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For named/typed outputs, producer/consumer contract, redaction, persistence scope and proving the output refers to the intended target revision, prefer typed fields and stable IDs over human presentation text.