Trigger automation from events with Event-Driven Ansible
Event-Driven Ansible is a highly scalable, flexible automation capability. It works with external event sources (like software vendors' monitoring tools) to identify IT events and automatically implement the defined changes or responses within a rulebook.
Learn how to configure and manage the end-to-end lifecycle of event-driven automation within the Red Hat Ansible Automation Platform. Event-Driven Ansible provides you the ability to perform the following actions:
- Manage projects for rulebook storage
- Build and restore decision environments for execution
- Define credentials for secure authentication
- Create event streams for centralized routing
- Manage rulebook activations to main persistent, scalable listeners that monitor infrastructure and trigger automated workflows in real time
- API documentation for Event-Driven Ansible controller is available at https://<gateway-host>/api/eda/v1/docs
- To meet high availability demands, Event-Driven Ansible controller shares centralized Redis (REmote DIctionary Server) with the Ansible Automation Platform UI. When Redis is unavailable, you will not be able to create or sync projects, or enable rulebook activations.
In new installations of Ansible Automation Platform 2.6, using Event-Driven Ansible controller’s API to manage organizations, teams, or users requires an automated sync of up to 15 minutes to propagate changes to the rest of the Ansible Automation Platform components. To avoid potential errors and ensure immediate access, use the platform gateway API instead, or the unified UI.
- Organize rulebooks for event-driven automation
Projects are a logical collection of rulebooks. They must be a git repository and located in the path defined for Event-Driven Ansible content in Ansible collections:/extensions/eda/rulebooksat the root of the project. - Create runtime environments for event-driven automation
Decision environments are container images that run Ansible rulebooks. They create a common language for communicating automation dependencies, and give a standard way to build and distribute the automation environment. - Define rules that trigger automation from events
A rulebook is a set of conditional rules that Event-Driven Ansible uses to perform IT actions in an event-driven automation model. Rulebooks are the means that users tell Event-Driven Ansible which source to check for an event and when that event occurs what to do when certain conditions are met. - Manage active event-driven automation integrations
To maintain efficient event-driven workflows, you must manage the lifecycle of your rulebook activations. Managing these activations effectively ensures that your automation remains responsive, reduces resource duplication, and minimizes downtime during configuration updates. - Reuse event-driven automation configurations
Streamline your workflow by duplicating existing rulebook activations to reuse proven configurations. This section covers how to create copies, manage unique naming requirements, and navigate bulk-enablement safety warnings to avoid duplicate job failures. - Activate webhook-based automation in Openshift
In Openshift environments, you can activate webhooks by creating a route to expose the activation’s service, enabling external systems to send events and trigger automation. - Audit pipeline-triggered automation activity
Rule audit allows the auditing of rules which have been triggered by all the rules that were activated at some point. - Troubleshoot failed event-driven automation triggers
Rulebook activations might occasionally fail due to various reasons. While many issues can be resolved through basic checks, diagnosing failures across a distributed system requires robust logging. - Respond to events from external systems
Simplified event routing provides Event-Driven Ansible controller the capability to capture and analyze data from various remote systems (like GitHub or GitLab) using event streams. You can attach one or more event streams to an activation by swapping out sources in a rulebook. - Filter events before triggering automation
Events sometimes have extra data that is unnecessary and might overwhelm the rule engine. Use event filters to remove that extra data so you can focus on what matters to your rules. Event filters might also change the format of the data so that the rule conditions can better match the data.