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.
A rulebook specifies actions to be performed when a rule is triggered. A rule gets triggered when the events match the conditions for the rules. The following actions are currently supported:
run_playbook(only supported with ansible-rulebook CLI)-
run_module -
run_job_template -
run_workflow_template -
set_fact -
post_event -
retract_fact -
print_event -
shutdown -
debug -
none
To view further details, see Ansible Actions.
A rulebook activation is a process running in the background defined by a decision environment executing a specific rulebook. You can set up your rulebook activation by following Set up a rulebook activation.
Red Hat does not recommend the use of a non-supported source plugin with 1 postgres database. This can pose a potential risk to your use of Ansible Automation Platform.
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, the following functions will not be available:
- Creating an activation, if
is_enabledis True - Deleting an activation
- Enabling an activation, if not already enabled
- Disabling an activation, if not already disabled
- Restarting an activation
Set up a rulebook activation Copy linkLink copied!
Create a rulebook activation to link a rulebook to a decision environment and event sources, initiating the event-driven automation process.
Before you begin Copy linkLink copied!
- You are logged in to the Ansible Automation Platform Dashboard as a Content Consumer.
- You have set up a project.
- You have set up a decision environment.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
Your rulebook activation is now created and can be managed on the Rulebook Activations page.
After saving the new rulebook activation, the rulebook activation’s details page is displayed, with either a Pending, Running, or Failed status. From there or the Rulebook Activations list view, you can restart or delete it.
Occasionally, when a source plugin shuts down, it causes a rulebook to exit gracefully after a certain amount of time. When a rulebook activation shuts down, any tasks that are waiting to be performed will be canceled, and an info level message is sent to the activation log. For more information, see Rulebooks.
Rulebook activation list view Copy linkLink copied!
Use the Rulebook Activations list view to quickly monitor the operational status, event fire count, and restart frequency of all your deployed automation services.
If the Status is Running, it means that the rulebook activation is running in the background and executing the required actions according to the rules declared in the rulebook.
You can view more details by selecting the activation from the Rulebook Activations list view.
For all activations that have run, you can view the Details and History tabs to get more information about what happened.
View activation output Copy linkLink copied!
View the activation output in the History tab to inspect the execution results, confirm successful automation runs, and diagnose runtime errors or task failures.
Procedure Copy linkLink copied!
- Select the History tab to access the list of all the activation instances. An activation instance represents a single execution of the activation.
- Then select the activation instance you want to view. The Output for the activation instance is displayed.
What to do next Copy linkLink copied!
To view events that came in and triggered an action, navigate to and follow instructions in the Rule Audit section.