Active

AI Generated

Request Type Routing

One form, four runbooks

One form. Four completely different runbooks.


Description

Switch on request_type from an automation orchestrator survey, webhook, or ticket integration. Each value triggers a purpose-built automation path.

Why it matters

  • One intake form routes to four completely different runbooks — no duplicate workflows per request type.
  • Survey, webhook, or ticket integrations all publish the same request_type artifact.
  • Human-initiated automation gets the same switch pattern as infrastructure metrics.

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: "Survey or Webhook", pos: "b", h: 96, constraint: "on" } --> B@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Process Request", pos: "b", h: 96, constraint: "on" }
  B --> C@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/switch-node.png", label: "request_type", pos: "b", h: 96, constraint: "on" }
  C -->|new_hire| D@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Provision New Hire", pos: "b", h: 96, constraint: "on" }
  C -->|contractor| E@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Provision Contractor", pos: "b", h: 96, constraint: "on" }
  C -->|role_change| F@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Update Role", pos: "b", h: 96, constraint: "on" }
  C -->|termination| G@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Terminate User", 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

request_type Action
new_hire Create user, SSH key, sudo, groups
contractor Create user, expiry date, limited sudo
role_change Update groups and sudo only
termination Lock account, archive home, revoke keys

Playbooks

Playbook What it does Runs on
process_request.yml Validates request_type input and publishes it as an artifact for the AO switch. localhost
provision_new_hire.yml Creates user account with SSH key, sudo access, and group membership. RHEL node
provision_contractor.yml Creates a contractor user with expiry date and limited sudo. RHEL node
update_role.yml Updates an existing user's groups and sudo rules with before/after state. RHEL node
terminate_user.yml Locks account, archives home directory, and revokes SSH keys. RHEL node
notify_chatroom.yml Posts user lifecycle action 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.