For the complete documentation index, see llms.txt. This page is also available as Markdown.

Managing Large Ansible Outputs

Understand how the Ansible plugin manages large playbook outputs through truncation and file export.

The Ansible plugin automatically manages large playbook outputs through truncation and file export options. This ensures reliable telemetry while preserving access to full execution details.


View Ansible output

Ansible execution results are available in multiple locations:

  • Pipeline Run: Execution logs and summary statistics

  • Playbook/Inventory Activity History: Historical execution data

  • Host View: Per-host task results and status

  • Custom Export: Full output to file. Go to Export full output to file to configure file-based output.

  • Output Variables: Export data for use in subsequent pipeline steps. Go to Output variables for Ansible to configure output variables.


Automatic truncation

The Ansible plugin applies two levels of truncation to manage output size.

Message truncation (per-task)

Applies to: Individual task msg and skip_reason fields exceeding 1000 characters

Action: Truncates to 1000 characters with " ... [truncated]" suffix

Configuration

Example


Circuit breaker (payload size limit)

Trigger: Final JSON payload exceeds 5 MB

Behavior

  • Removes all tasks arrays from host results

  • Preserves host-level stats (changed, failures, ok, rescued, skipped, unreachable)

  • Preserves metadata (playbook, inventory, status, duration)

Example output

What's preserved


Export full output to file

When truncation occurs, detailed task information is removed from telemetry. Export full output to a file for debugging complex failures, compliance and audit requirements, or long-term archival.

Configure file export

Set the ANSIBLE_OUTPUT_FILE environment variable to specify the output file path:

File export behavior

  1. Writes complete structured output before any truncation

  2. Includes all hosts, tasks, and messages in full

  3. Pretty-printed JSON format

  4. Truncation still applies to telemetry payload

Example output


Upload output to object storage

When ANSIBLE_OUTPUT_FILE is configured, the output file can be uploaded to cloud storage (S3, GCS, Azure Blob) as a subsequent pipeline step.

Go to Build and upload artifacts to review configuration options for uploading artifacts to object storage.


Log output examples

No truncation

With truncation


Configuration reference

Variable
Default
Description

ANSIBLE_MAX_TASK_MSG_SIZE

1000

Maximum characters for task message fields

ANSIBLE_OUTPUT_FILE

(unset)

Path to write full output before truncation


FAQ

Why is my task output truncated?

Individual task messages exceeding 1KB are automatically truncated. Set the ANSIBLE_OUTPUT_FILE environment variable to preserve full output to a file.

Why don't I see task details in the UI?

When payload exceeds 5MB, task arrays are removed and only host-level stats are sent. Set the ANSIBLE_OUTPUT_FILE environment variable to capture full details to a file.

Can I increase the 5MB limit?

The 5MB limit is fixed to ensure system stability. Use ANSIBLE_OUTPUT_FILE to capture full output to a file instead.

Does truncation affect billing?

No. Host-level stats are always preserved and used for usage tracking.

Where should I store the output file?

The /harness/ directory is recommended. The file persists within the step execution and can be uploaded to object storage in a subsequent pipeline step.


Last updated

Was this helpful?