This tutorial builds an AIOps workflow for diagnosing and remediating a deliberately induced CPU incident in a product catalog application running on an AWS EC2 instance with RHEL. An Ansible investigation playbook collects CPU utilization, top processes, application status, and HTTP health evidence, which Claude Code analyzes through MCP to identify the Python process as the likely contributor and recommend the approved “AIOps - Remediate High CPU” Job Template. AI does not access the host directly: Ansible Automation Platform retains responsibility for credentials, inventory, execution, and remediation. The remediation changes the application from HTTP 503 and degraded to HTTP 200 and healthy, while a final health check confirms recovery and completes the detect-investigate-analyze-recommend-execute-verify sequence.
Context
The workflow addresses the challenge of turning AI-assisted incident analysis into a safe, repeatable action. The demonstration uses a product catalog application with an intentionally injected CPU spike, producing high CPU utilization and a degraded health response instead of relying on a hypothetical alert.
Approach / What changed
Ansible Automation Platform gathers structured evidence from the RHEL host, Claude Code analyzes it through the MCP server and selects an approved remediation Job Template, and Ansible executes the remediation without giving AI direct SSH access. A separate health-check workflow verifies recovery.
Takeaways
1
Ansible collects CPU utilization, top CPU-consuming processes, application status, and HTTP health evidence before AI analysis.
2
Claude Code identifies the Python application process as the likely contributor and recommends the approved “AIOps - Remediate High CPU” Job Template, which has start permission.
3
The remediation restores the application from HTTP 503 and degraded to HTTP 200 and healthy; a health-check workflow confirms the recovery.
Ansible excels at two different jobs: orchestrating multi-step infrastructure workflows and automating routine tasks hands-off. Learn the tradeoff between control and scale that should guide your choice.
Alpine Linux shrinks container images by replacing glibc with musl and using a minimal base, but introduces compatibility trade-offs you must evaluate before switching.
AIOps automates the detect-investigate-analyze-recommend-execute-verify cycle by combining AI reasoning with infrastructure automation, keeping humans in control of credentials and final decisions.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.