Ansible / Editorial solution guide

Investigate an Ansible async job with no final result

Trace a detached job from per-host launch to status, partial effects and bounded recovery.

About 3 min readContent reviewed

Read-only knowledge base · No public comments

Recognize the symptoms

A fictional play starts a long task with poll: 0 and immediately runs a dependent step. The launch reports a job identifier, but the final result is missing and the dependent step fails. A successful launch does not establish completion.

Understand the likely causes

  • The play may not wait for or retrieve each host’s async result. The host may be unreachable, the job may have failed or timed out, or the status record may have been removed. Partial remote effects can remain even when the result is unavailable.

Capture per-host evidence

Record the playbook revision, inventory target, host, operation, async limit, poll setting, job ID and timestamps. Preserve sanitized launch and later task results without credentials or sensitive output. Determine whether the job was never queried, is still running, failed, timed out or cannot be inspected. Do not assume the same status on every host.

Inspect the job and target

Under an approved read-only investigation, use the documented async status mechanism for the correct host and job ID. Compare the reported state with the actual application or file state and available logs. If the host or status is unavailable, record the uncertainty. A timeout or missing result does not prove the operation had no side effects.

Gate dependent work

For a task whose result is required, use an explicit per-host completion check and approved success condition before the dependent step. Positive polling may be suitable when the play should wait; poll zero is useful only when the workflow tracks completion separately. Consider shared resources and concurrency before allowing multiple detached jobs.

Recover and clean up carefully

Consult the operation owner before retrying a job that may have partially completed. Use an idempotent recovery procedure or inspect and repair the target in an isolated lab first. Preserve evidence and follow the documented async cache cleanup behavior for the installed version. Do not delete a status record merely to hide a failure.

Verify the fix

In a disposable authorized lab, run a bounded synthetic task and confirm that dependent work starts only after a verified success for each target. Test failure or timeout and confirm that the workflow stops or follows the reviewed recovery path.

Compare launch, final status and target state; retain sanitized identifiers and timestamps. Verify cleanup after evidence retention. Escalate an unknown result instead of reporting success.

Keep it from recurring

  • Document async time limits, per-host tracking, concurrency and recovery ownership. Test partial effects and cleanup; distinguish launch from operation success.

Official references