Exercise 3: Event-Driven Ansible - Automation Decisions


Overview

What is Event-Driven Ansible?

Event-Driven Ansible allows you to rip out more pages of your hardcopy runbook. While Automation Controller (through Playbooks) may automate your response to particular events, Event-Driven Ansible (through Rulebooks) codifies the symptoms that you have to recognize from an event before being able to respond.

If you’re able to describe the conditions for action and specify the response to those conditions, your automation will become more resilient and allow your organization to respond with automation much quicker.

Unified User Experience

With Ansible Automation Platform 2.5, components of the platform are co-located under a new unified user experience. Now you will find the Automation Decisions (EDA) user interface in the same screen as Automation Execution (Controller).

Getting Started

Step 1: If you are not in the AAP tab, switch to the AAP tab.

Step 2: Log in using the credentials below.

Lab Environment

The following services are available in your lab environment:

Service Purpose Access Port

AAP

Ansible Automation Platform Web UI

443

NetBox Web

NetBox Web Interface

8000

VS Code

Visual Studio Code Editor

80

Terminal-1

DevTools Command Line

N/A

Lab Credentials

Ansible Automation Platform Credentials:

  • Username: admin

  • Password: ansible123!

NetBox Credentials:

  • Username: admin

  • Password: netbox


EDA Controller Resources

Understanding EDA Resources

Just like Automation Controller has resources needed for job template execution, Event-Driven Ansible Controller defines resources needed for execution of rulebooks. There are three main resource types that have to be defined before creating a rulebook activation that will listen for incoming events.

Automation Decisions Overview

Decision Environments

What are Decision Environments?

If you’re already familiar with Ansible Execution Environments, you will find Decision Environments very similar.

The main differences between the two are:

  • Execution Environments (EEs) are built to contain tools to execute Playbooks

  • Decision Environments (DEs) contain tools to execute Rulebooks

Both are container images that contain all the resources needed to execute Ansible playbooks and rulebooks, including the required collections.

Source Plugins in Decision Environments

Decision Environments are also built with collections that contain the source plugins for any source you want to receive events from. This means that if you’d like to receive events from Dynatrace, for example, you would have to install the collection dynatrace.event_driven_ansible in order to leverage the source plugin for Dynatrace.

Explore Decision Environments

Step 1: In the left-hand sidebar menu in AAP, navigate to menu:Automation Decisions[Infrastructure > Decision Environments].

Step 2: Take a look at the available Decision Environments.

You’ll notice that there are already Decision Environments added to AAP:

Default Decision Environment

This was added at installation time and is distributed by Red Hat as de-supported.

NetOps Decision Environment

This was created for this workshop and is custom-built. This Decision Environment contains the collection ansible.eda which ships supported plugins for several event sources.

EDA Controller Decision Environments

Decision Environments are essential for Event-Driven Ansible to function properly, as they contain all the necessary dependencies and source plugins.


Credentials

Understanding EDA Credentials

Credentials can be leveraged for pull operations for both Decision Environments and Projects, used to connect to external event sources, and to secure inbound webhook endpoints via Event Streams.

Explore Credentials

Step 1: In the left-hand sidebar, navigate to menu:Automation Decisions[Infrastructure > Credentials].

Step 2: Review the available credentials.

If you have private repositories for either Decision Environments or Projects, you can create a credential from this section.

By default, you will see:

Decision Environment Container Registry

This credential is added at installation time.

AAP

This credential was pre-loaded into the AAP instance for this workshop. This credential will be used for Rulebook Activations in upcoming exercises.

EDA Controller Credentials

Credentials in EDA Controller provide secure access to external systems and repositories, ensuring your automation remains secure.


Projects

What are Projects in EDA?

Projects are really just like they are in Automation Controller (under the Automation Execution heading). These projects represent source control repositories that contain your rulebooks.

Explore Projects

Step 1: In the left-hand sidebar, navigate to menu:Automation Decisions[Projects].

Step 2: Review the available projects that contain rulebooks.

EDA Controller Projects

Projects in EDA Controller work the same way as in Automation Controller, linking to Git repositories that contain your automation content - in this case, rulebooks instead of playbooks.


Summary

In this exercise, you’ve learned about the key components of Event-Driven Ansible:

  • Decision Environments: Container images with tools to execute rulebooks

  • Credentials: Secure access to external systems and repositories

  • Projects: Source control repositories containing your rulebooks

These three resources work together to enable Event-Driven Ansible to listen for events and automatically respond based on the conditions you define in your rulebooks.


Next Steps

Congratulations! You’ve completed the introduction to Event-Driven Ansible and explored its core components.

Step 1: Press the Next button below to go to the next challenge.


End of Exercise 3