Active
AI Generated
Patch Severity Routing
Switch routing — one scan, four remediation strategies
One scan job. Four remediation strategies.
Description
Run a patch assessment playbook that publishes highest_severity from dnf updateinfo or an Insights scan. Switch on the value and route to the response that matches your change policy.
Why it matters
- Patch severity from a single assessment drives the change policy — critical now, important scheduled, moderate batched.
- Aligns automation with how change advisory boards actually approve work.
- Avoids patching everything urgently or nothing at all when scan results land.
AO building blocks
Automation orchestrator step types this workflow uses on the canvas. See all building blocks
-
Triggers
Manual trigger
Starts a workflow when a user clicks Run in the UI or calls the workflow execution API — the simplest entry point for on-demand runs like demos, break-glass remediation, or operator-initiated changes. No extra configuration is required, and runs appear in history with the triggering user as the source.
-
Logic
Switch step
Evaluates conditions and routes execution to the first matching branch, supporting up to 100 ordered paths plus a fallback when nothing matches. Use it to branch on severity tiers, environment (dev/staging/prod), or AI agent output categories where a binary conditional isn't enough.
-
AAP execution
AAP job template
Launches a single Ansible Automation Platform job template from the workflow, polling until the job completes and exposing results to downstream steps. The standard bridge between automation orchestrator reasoning and AAP execution — one playbook with resolved inventory, credentials, limits, and extra vars.
Interactive Experience
Workflow
flowchart LR
A@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/manual-trigger.png", label: "Manual Trigger", pos: "b", h: 96, constraint: "on" } --> B@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Patch Assessment", pos: "b", h: 96, constraint: "on" }
B --> C@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/switch-node.png", label: "highest_severity", pos: "b", h: 96, constraint: "on" }
C -->|critical| D@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Patch Now", pos: "b", h: 96, constraint: "on" }
C -->|important| E@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Schedule Change", pos: "b", h: 96, constraint: "on" }
C -->|moderate| F@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Weekly Batch", pos: "b", h: 96, constraint: "on" }
C -->|none| G@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Report Compliant", pos: "b", h: 96, constraint: "on" }
D --> H@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Notify Chatroom", pos: "b", h: 96, constraint: "on" }
E --> H
F --> H
G --> H
classDef noBorder fill:transparent,stroke:transparent
class A,B,C,D,E,F,G,H noBorder
Switch routing
| highest_severity | Action |
|---|---|
critical |
Patch now + open maintenance window |
important |
Schedule change window |
moderate |
Add to weekly batch |
none |
Report compliant, exit |
Playbooks
| Playbook | What it does | Runs on |
|---|---|---|
check_patches.yml
|
Runs dnf updateinfo assessment and publishes highest_severity artifact for the AO switch. | RHEL node |
remediate_patch_now.yml
|
Applies critical security updates immediately and checks if reboot is required. | RHEL node |
remediate_schedule_change.yml
|
Logs important advisories for scheduling in the next change window. | RHEL node |
remediate_weekly_batch.yml
|
Writes a batch manifest for moderate patches to be applied in the weekly window. | RHEL node |
remediate_report_compliant.yml
|
Logs compliant status when no patches are needed. | RHEL node |
notify_chatroom.yml
|
Posts patch assessment results to Mattermost. | localhost (Mattermost API) |
AI Generated
This demo's playbooks and workflow were generated by AI to illustrate the pattern. They have not been fully tested in a live environment. Review and adapt before using in production.