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
tasksarrays from host resultsPreserves 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
Writes complete structured output before any truncation
Includes all hosts, tasks, and messages in full
Pretty-printed JSON format
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
ANSIBLE_MAX_TASK_MSG_SIZE
1000
Maximum characters for task message fields
ANSIBLE_OUTPUT_FILE
(unset)
Path to write full output before truncation
FAQ
Related concepts
Go to Output variables for Ansible to export data from playbooks to other pipeline steps.
Last updated
Was this helpful?