log-analysis

Parse Ansible stdout to identify failing tasks and extract structured error details.

3|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/rhpds/athena-aiops-deep-agent --skill log-analysis-rhpds
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: log-analysis
Source: https://github.com/rhpds/athena-aiops-deep-agent/tree/main/skills/common/log-analysis
Command: npx skills add https://github.com/rhpds/athena-aiops-deep-agent --skill log-analysis-rhpds

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Parsing and understanding large Ansible/AAP2 logs is tedious and error-prone. This skill streamlines the process by locating the failing task, isolating the error, and surfacing actionable root-cause signals.

Core Features & Use Cases

  • Identify task boundaries using TASK markers, and locate the failing task.
  • Extract the error detail, including messages, rc, stdout, and stderr.
  • Surface warnings preceding the failure and highlight host-specific vs environmental issues.
  • Gather structured details such as role, play, and stack traces to aid debugging across multiple hosts.

Quick Start

Input the Ansible/AAP2 stdout to the log-analysis skill to identify the failing task and extract the error details.

Frequently Asked Questions about log-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the failing task in a large Ansible log?

To find the failing task in an Ansible log, you need to locate TASK boundaries and capture the fatal or FAILED! blocks. Parsing large logs isolates the failing task and extracts structured error details for root-cause analysis.

How do I extract error details from AAP2 stdout?

Extracting error details from AAP2 stdout involves reading the JSON error block after the => arrow. This process surfaces messages, return codes, stdout, and stderr to help identify host-specific or environmental issues.

Can I debug multi-host Ansible playbook failures from a single log output?

Yes, you can debug multi-host Ansible playbook failures from a single log by locating task boundaries and isolating dispersed failures. This approach gathers structured details like roles, plays, and stack traces across multiple hosts.

What is the best way to analyze Ansible stack traces and pre-failure warnings?

Analyzing Ansible stack traces and pre-failure warnings requires surfacing the signals preceding a failure. Parsing the log highlights these warnings and structured details to support root-cause analysis and identify environmental issues.

Why does parsing Ansible stdout manually fail to find the root cause?

Parsing Ansible stdout manually fails because large logs disperse failures across tasks and hosts. Automating the location of TASK boundaries and fatal blocks ensures accurate extraction of structured JSON error details for root-cause identification.