Active

AI Generated

RHEL Subscription Routing

Route by registration state


Description

Switch on RHEL subscription state after a compliance check. Registration status drives the remediation path — not whether the Ansible job turned green.

Why it matters

  • RHEL subscription state — expiring, expired, unregistered — needs different fixes than a green Ansible job result.
  • Compliance scans that publish subscription_status enable proactive renewal before entitlement lapses.
  • Registration automation on unregistered hosts closes drift without manual inventory hunts.

AO building blocks

Automation orchestrator step types this workflow uses on the canvas. See all building blocks

Interactive Experience

Coming soon

Workflow

flowchart LR
  A@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/manual-trigger.png", label: "Schedule", pos: "b", h: 96, constraint: "on" } --> B@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Check Subscription", pos: "b", h: 96, constraint: "on" }
  B --> C@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/switch-node.png", label: "subscription_status", pos: "b", h: 96, constraint: "on" }
  C -->|registered| D@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Log Compliant", pos: "b", h: 96, constraint: "on" }
  C -->|expiring| E@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Notify Expiring", pos: "b", h: 96, constraint: "on" }
  C -->|expired| F@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Renew Subscription", pos: "b", h: 96, constraint: "on" }
  C -->|unregistered| G@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Register System", 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

subscription_status Action
registered Log compliant
expiring Notify + schedule renewal
expired Register or attach subscription
unregistered Register with activation key

Playbooks

Playbook What it does Runs on
check_subscription.yml Checks RHEL subscription status and classifies as registered, expiring, expired, or unregistered. RHEL node
log_compliant.yml Logs compliance for properly registered systems. RHEL node
notify_expiring.yml Logs expiring subscription advisory with expiry details. RHEL node
renew_subscription.yml Refreshes and auto-attaches expired RHEL subscriptions. RHEL node
register_system.yml Registers unregistered systems with activation key. RHEL node
notify_chatroom.yml Posts subscription status to Mattermost with color-coded status. 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.