Section 3 - Summary and Call to Actions
You have completed the lab. This section will help you go further by documenting all the Ansible Playbooks and showing you how they work!
 
Summary of Job Templates
Here’s a recap of the job templates and rulebooks used in the lab: (in chronological order):
Glossary:
RB = Rulebook (for Event-Driven Ansible) JT = Job Template (for executing Ansible Playbooks)
| Name | Purpose | 
| 
 | JT simulates a failure in the Apache config | 
| 
 | RB that watches Kafka queue for httpd disruption | 
| 
 | JT that checks the current state of Apache | 
| 
 | JT that uses RHEL AI to understand the error | 
| 
 | JT sends incident details to a chat system | 
| 
 | JT that creates a JT to generate playbooks | 
| 
 | JT that uses Lightspeed to generate the fix | 
| 
 | JT pushes the generated playbook to Git | 
| 
 | Workflow node that syncs Gitea project with dynamically created playbooks | 
| 
 | JT that creates another JT to apply the AI-generated fix | 
| 
 | JT for Final fix (launched manually) | 
| 
 | JT that Restores Apache to a known-good config | 
Now here is a walkthrough in the same chronological order:
โ Break Apache
Purpose: Introduces a known bad directive in /etc/httpd/conf/httpd.conf to cause Apache failure
What happens next:
- 
Filebeat detects the service issue 
- 
Kafka forwards the event 
- 
EDA rulebook matches and triggers AI Insights and Lightspeed prompt generationworkflow
Ansible Playbook: Github Link
AI Insights and Lightspeed prompt generation workflow
Also known as the Enrichment Workflow for short!
 
โ๏ธ Apache Service Status Check
Purpose: Checks whether Apache is active and logs its status.
What it does:
- 
Runs systemctl status httpd
- 
Collects output and logs it 
- 
Output is consumed by the next steps (Red Hat AI and Mattermost) 
Ansible Playbook: Github Link
๐ค RHEL AI: Analyze Incident
Purpose: Uses Red Hat AI inference service to understand the failure message.
What it does:
- 
Sends logs 
- 
Returns a natural-language description of the error 
- 
Suggests what kind of automation could fix it 
Ansible Playbook: Github Link
๐ฃ Notify via Mattermost
Purpose: Sends a human-readable incident message to a Mattermost channel.
What it does:
- 
Formats the AI response and Apache status 
- 
Pushes it to a channel using Mattermost Webhook 
- 
Simulates integration with a real ITSM tool like ServiceNow 
Ansible Playbook: Github Link
โ๏ธ Build Ansible Lightspeed Job Template
Purpose: Creates a new job template for the second workflow
What it does:
- 
Create a job template with a survey that includes: - 
A user-defined prompt field 
- 
A pre-filled prompt from Red Hat AI output 
 
- 
Why this is important:
This allows Ansible Lightspeed to generate a remediation playbook without writing code manually. The job template created here will be used in the second workflow.
Ansible Playbook: Github Link
Remediation Workflow
 
๐ง  Lightspeed Remediation Playbook Generator
Purpose:
Runs the job template created in the previous workflow AI Insights and Lightspeed prompt generation to generate a playbook from the AI prompt.
What it does:
- 
Uses Lightspeed to turn a prompt into a YAML playbook 
- 
Stores the result locally as lightspeed-response.yml
Ansible Playbook: Github Link
๐งพ Commit Fix to Gitea
Purpose: Pushes the generated playbook to the Gitea Git repository.
What it does:
- 
Authenticates with Gitea 
- 
Commits lightspeed-response.yml
- 
Makes the playbook available for automation use 
Ansible Playbook: Github Link
Sync Project to Lightspeed-Playbooks
Purpose: Syncs the git project from Gitea to Ansible Automation Platform
๐ก This is not a Job Template, but a built-in node that will sync Git projects within the workflow visualizer
โ๏ธ Build HTTPD Remediation Template
Purpose: Creates a new job template that uses the playbook pushed by Ansible Lightspeed to fix the Apache (httpd) service.
What it does:
- 
Creates a new Job Template called Execute HTTPD Remediation
- 
Uses the dynamically generated lightspeed-response.ymlplaybook
- 
Sets up the credentials, inventory and prompt for limit 
Ansible Playbook: Github Link
Execute HTTPD Remediation
Purpose Fix httpd on the RHEL webserver
What is does
- 
Removes the bad syntax from the httpd configuration file 
- 
Restarts the httpd service 
Ansible Playbook: This Job Template is dynamically generated from Ansible Lightspeed and stored in your Gitea instance. The Ansible Playbook should look similar to this:
- name: Fix httpd
  become: true
  hosts: all
  tasks:
    - name: Remove line that contains InvalidDirectiveHere
      ansible.builtin.lineinfile:
        path: /etc/httpd/conf/httpd.conf
        regexp: ^InvalidDirectiveHere
        state: absent
    - name: Restart httpd
      ansible.builtin.service:
        name: httpd
        state: restartedโ
 Restore Apache
๐ก This Job Template is optional
Purpose
If you want to return Apache to a good state (without running AIOps workflows), you can run the โ
 Restore Apache job template.
What it does
- 
Should be mostly identical to what you see above for the Execute HTTPD Remediation
Ansible Playbook: Github Link
Call to action
 
Here are some recommended nexst steps in your Ansible AIOps journey:
- 
- 
Check out the AI + Ansible YouTube playlist 
 
- 
- 
Check out developers.redhat.com and get a home lab license. 
Are you ready to implement now?
