Execute Ansible automations for incidents
Use the Ansible Execution Agent to automatically launch mapped Ansible job templates during incident remediation in the Service Operations Workspace, reducing manual effort and accelerating mean time to resolution..
Before you begin
Before executing Ansible automations:
- Step-to-job mappings must exist for the predicted automation opportunity group
For more information, refer to Map Ansible jobs to resolution steps.
- The mappings must be in active state
- The Ansible Execution Agent must be configured and enabled
Role required: LEAP agent
About this task
When an incident arrives in the SOW, LEAP predicts the automation opportunity group using existing clustering. If step-to-job mappings exist for that group, automation options are presented to incident responders for execution.
Procedure
Result
The mapped Ansible automations are executed in sequence, with manual steps completed as needed. The incident is remediated using the automated workflow defined in the step-to-job mapping.
Example execution flow
For a database connectivity incident, the execution might proceed as follows:
- Agent: "Step 1: 'Restart the nginx service' — launching nginx-restart-playbook"
- Agent: "Launched successfully. Ansible Job ID: 12345. Status: Running"
- Agent: "Job completed successfully. Proceeding to next step."
- Agent: "Step 2: 'Flush DNS cache' — this step has no playbook mapped. Please complete this step manually."
- User: "Step completed" (after manually flushing DNS cache)
- Agent: "Step 3: 'Verify service health' — launching health-check-playbook"
- Agent: "All steps completed. Summary: 2 jobs launched, 1 manual step completed."
What to do next
After execution:
- Review the Ansible job logs in Ansible Automation Platform for detailed execution information.
- Document any issues or improvements for future automation opportunity mappings.
- Consider updating step-to-job mappings based on execution results and feedback.