Getting started with Event-Driven Ansible guide
Learn about the benefits and how to get started using Event-Driven Ansible.
Abstract
Event-Driven Ansible is a new way to enhance and expand automation by improving IT speed and agility while enabling consistency and resilience. This feature is designed for simplicity and flexibility.Preface
Thank you for your interest in Event-Driven Ansible. Event-Driven Ansible is a new way to enhance and expand automation. It helps teams automate decision-making and improve IT speed and agility.
This guide provides the conceptual framework of Event-Driven Ansible and links you to information on installing and using Event-Driven Ansible controller.
Providing feedback on Red Hat documentation
If you have a suggestion to improve this documentation, or find an error, please contact technical support at https://access.redhat.com to create an issue on the Ansible Automation Platform Jira project using the docs-product component.
Chapter 1. Event-Driven Ansible Automation
Event-Driven Ansible is a new way to connect to sources of events and act on those events using rulebooks. This technology improves IT speed and agility, and enables consistency and resilience.
1.1. Event-Driven Ansible benefits
Event-Driven Ansible is designed for simplicity and flexibility. With these enhancements, you can:
- Automate decision making
- Use many event sources
- Implement event-driven automation within and across multiple IT use cases
- Achieve new milestones in efficiency, service delivery excellence and cost savings
Event-Driven Ansible minimizes human error and automates processes to increase efficiency in troubleshooting and information gathering.
This guide helps you get started with Event-Driven Ansible by providing links to information about understanding, installing, and using Event-Driven Ansible controller.
Chapter 2. Ansible rulebooks
Event-Driven Ansible controller provides the interface in which Event-Driven Ansible automation performs. Ansible rulebook provides the framework for Event-Driven Ansible automation. Ansible rulebook is essentially a collection of rulesets, which in turn, consists of one or more sources, rules, and conditions.
2.1. Decision Environments
Event-Driven Ansible includes, by default, an ansible.eda collection, which contains sample sources, event filters and rulebooks. All the collections, ansible rulebooks and their dependencies use a Decision Environment, which is an image that can be run on either Podman or Kubernetes.
In Decision Environments, sources, which are typically Python code, are distributed through ansible-collections. They inject external events into a rulebook for processing. The rulebook consists of the following:
- The python interpreter
- Java Runtime Environment for Drools rule engine
- ansible-rulebook python package
- ansible.eda collection
You can use the base Decision Environment and build your own customized Decision Environments with additional collections and collection dependencies. You can build a Decision Environment using a Dockerfile or optionally you can deploy your CA certificate into the image.
2.2. Rulebook actions
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_job_template
-
run_playbook
(only supported with ansible-rulebook CLI) -
debug
-
print_event
-
set_fact
-
post_event
-
retract_fact
-
shutdown
Additional resources
- For more information on using rulebooks, see the Event-Driven Ansible controller User’s Guide.
- For more detailed information on Ansible rulebooks, see the section on Rulebooks in the Ansible Rulebook documentation.
Chapter 3. Installation of Event-Driven Ansible controller
Similar to the automation controller and automation hub components, the setup for Event-Driven Ansible controller includes default settings for specific variables in the inventory files.
Event-Driven Ansible controller must be installed on a separate server and cannot be installed on the same host as automation hub and automation controller.
If you are running Red Hat Enterprise Linux 8 and want to set your memory limits, you must have cgroup v2 enabled before you install Event-Driven Ansible. For specific instructions, see the Knowledge-Centered Support (KCS) article, Ansible Automation Platform Event-Driven Ansible controller for Red Hat Enterprise Linux 8 requires cgroupv2.
3.1. Installing Event-Driven Ansible controller on Red Hat Ansible Automation Platform
To prepare for installation of Event-Driven Ansible controller, review the following information in the Red Hat Ansible Automation Platform Planning Guide:
- Example Ansible Automation Platform architecture, including the Event-Driven Ansible controller
- Event-Driven Ansible controller general information
- Event-Driven Ansible controller system requirements
When you are ready to install the Event-Driven Ansible controller, see the procedures in the Red Hat Ansible Automation Platform Installation Guide beginning with Chapter 3. Installing Red Hat Ansible Automation Platform.
Lastly, see Appendix A. 5. Event-Driven Ansible controller variables in the Red Hat Ansible Automation Platform Installation Guide to view predefined variables for Event-Driven Ansible controller.
3.2. Deploying Event-Driven Ansible controller with Ansible Automation Platform Operator on OpenShift Container Platform
Event-Driven Ansible is not limited to Ansible Automation Platform on VMs. You can also access this feature on Ansible Automation Platform Operator on OpenShift Container Platform. To deploy Event-Driven Ansible with Ansible Automation Platform Operator, follow the instructions in Deploying Event-Driven Ansible controller with Ansible Automation Platform Operator on OpenShift Container Platform.
After successful deployment, you can connect to event sources and resolve issues more efficiently.
Additional resources
- For more detailed information on planning, see the Red Hat Ansible Automation Platform Planning Guide.
- For a comprehensive list of predefined variables for the Event-Driven Ansible controller, see the Red Hat Ansible Automation Platform Installation Guide.
- For more information about deployment on Ansible Automation Platform operator, see the Deploying the Red Hat Ansible Automation Platform operator on OpenShift Container Platform Guide
Chapter 4. Using Event-Driven Ansible controller
After you have successfully installed the Event-Driven Ansible controller, you can access the interface to manage your IT responses across all event sources. Since Event-Driven Ansible controller is integrated with automation controller, you can automate a combination of processes, including issue remediation, user administration tasks, operational logic, and the like.
4.1. Event-Driven Ansible controller tasks
Depending on your role, you can use Event-Driven Ansible controller for any of the following tasks:
- Configuring a new project
- Setting up a new decision environment
- Creating a new authentication token
- Setting up a rulebook activation
Next steps
- For further details on using Event-Driven Ansible controller, see the Event-Driven Ansible controller User’s Guide.