Network Automation and Sources of Truth


Experiencing Bugs or Issues? 🐛

If you encounter any content bugs during this lab, please help us improve! Log an issue on our GitHub repository:

Thank you for your feedback!

Lab Overview

Introduction

Welcome to the Network Automation and Sources of Truth laboratory. In this hands-on lab, you’ll learn how to integrate Ansible Automation Platform with NetBox to create a powerful network automation solution.

Ansible Automation Platform is a unified solution for strategic automation. It combines the security, features, integrations, and flexibility needed to scale automation across domains, orchestrate essential workflows, and optimize IT operations to successfully adopt enterprise AI.

NetBox is widely deployed in enterprise footprints and is trusted by IT, networking, and datacenter teams. Combining the capabilities of DCIM and IPAM into a comprehensive network source of truth, NetBox is the perfect partner to Ansible Automation Platform and your network.

NetOps is an approach to network operations that focuses on rapid deployments and agility. It is also referred to as NetOps 2.0 or NetDevOps, and has become the standard operating procedure for digital enterprises working to keep pace with customer expectations. NetOps includes elements of automation, orchestration, and continuous validation to enable agile development and application delivery in modern IT organizations with complex network infrastructure.

What You’ll Learn

In this laboratory, we will get started with Network Automation and Sources of Truth using Ansible Automation Platform 2.5 together with NetBox. You will complete hands-on exercises to:

  • Configure NetBox as a Dynamic Inventory in Ansible Automation Platform using their Certified Content Collection

  • Integrate with Event-Driven Ansible through webhooks to listen to events in your network and take action

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

Gitea

Git Repository Service

3000

Terminal

DevTools Command Line

N/A

NetBox Term

NetBox Command Line

N/A


Exercise 1: Introduction to Ansible Automation Platform Web UI

Overview

Welcome to Red Hat Ansible Automation Platform. The new unified web UI in Ansible Automation Platform 2.5 has integrated all the components into a single control dashboard. We will be exploring the Automation Execution (automation controller) and Automation Decision (event-driven Ansible) functionality during this workshop.

For this exercise, we will focus on the Automation Execution (Automation controller) and its features.

Login Credentials

Use the following credentials to log in to Ansible Automation Platform:

  • Username: admin

  • Password: ansible123!

Getting Started

Step 1: Switch to the AAP tab to access the Ansible Automation Platform login screen.

Step 2: Enter the credentials provided above to log in.

Step 3: Take a moment to familiarize yourself with the unified UI.

In the following exercises, we will show you how to configure NetBox as the Dynamic Inventory source for Ansible Automation Platform and how to set up Event-Driven Ansible in the web UI, just as you would in a corporate environment to run your automation.


Exercise 2: Explore the Overview Dashboard

Task Description

Step 1: Navigate to the Overview page (this is typically the landing page after login).

Step 2: Explore the dashboard sections listed below.

The initial screen will show limited information due to the lack of playbooks, hosts, and executions. Take a look now, and you will be able to compare it to the end result once you’ve finished the lab.

Dashboard Sections

You will find the following card-like sections in the Overview screen:

Resource Counts

This section displays a summary of hosts, projects, and inventories.

Job Activity

This section shows a graph with the past month’s job runs.

Jobs

A list of recently run jobs.

Projects

A list of recently updated projects.

Inventories

A list of recently updated inventories.

Step 3: Review the Overview dashboard layout shown in the image below:

Overview Dashboard

Step 4: Click on any of the section titles (or "View all" links) to navigate to the corresponding section. We recommend you take a peek at each one.

Quick Start Guides

Step 5: Scroll to the bottom of the Overview page and locate the new card-like section that includes Quick Start Guides.

Quick Start Guides

This new section provides interactive in-line tutorials that are very useful for learning about all the features in AAP right after you install it. You can get instructions for using them without leaving the interface.


Exercise 3: Explore the Inventories Section

What is an Inventory?

An Inventory is a collection of hosts against which playbooks may be launched or run. Basically, these are the "managed nodes" or devices we are automating. The inventory in AAP is the same concept as an inventory file you might know from working with Ansible on the command line.

Inventories in AAP have several advantages over file-based ones. You get all the functionality from traditional inventory files, with added features and better reusability.

Exploring the Demo Inventory

Step 1: In the left sidebar, click on the Automation Execution drop-down menu to expand it.

Step 2: Navigate to InfrastructureInventories.

Step 3: Explore the Demo Inventory that comes pre-loaded.

Step 4: Review the different tabs available to familiarize yourself with the fields.

Controller Inventory

For now, just explore the interface. You will create your own inventory soon!


Exercise 4: Explore the Projects Section

What is a Project?

Projects are logical groups of Ansible playbooks in automation controller. These playbooks usually reside in a source code version control system like Git (and platforms such as GitHub or GitLab). With Projects, we can reference a repository or directory with one or several playbooks that we will later use.

Exploring the Demo Project

Step 1: In the sidebar menu, under Automation Execution, click on the Projects submenu.

Step 2: Explore the Demo Project that comes pre-loaded.

Step 3: Review all the fields available when creating a project.

Step 4: Don’t forget to examine the different tabs!

Controller Project

Exercise 5: Explore the Templates Section

What is a Job Template?

A Job Template is a definition and set of parameters for running an Ansible job. Job templates are useful to run the same job many times. They also encourage the reuse of Ansible Playbook content and collaboration between teams.

Exploring the Demo Job Template

Step 1: In the sidebar menu, under Automation Execution, click on the Templates submenu.

Step 2: Explore the Demo Job Template that comes pre-loaded.

Step 3: Review the configuration options and parameters available.

Controller Job Template

Later on in this workshop, we will be creating our own Job Templates.


Next Steps

Congratulations! You’ve completed the introduction to Ansible Automation Platform and explored the key components of the unified web UI.

Step 1: Press the Next button below to proceed to the next challenge once you’ve completed all the tasks above.


Troubleshooting

Common Issues and Solutions

NetBox Startup Time

NetBox needs a couple of minutes to get started. If you experience issues accessing NetBox, please wait 2-3 minutes and try again.

NetBox Tab Access Problems

If you’re having problems accessing the NetBox tab, follow these steps:

Step 1: Go to the AAP Terminal tab.

Step 2: Run the following command to stop NetBox:

docker compose --project-directory=/tmp/netbox-docker stop

Step 3: Run the following command to restart NetBox services:

docker compose --project-directory=/tmp/netbox-docker up -d netbox netbox-worker

Step 4: Wait 2-3 minutes for the services to fully start, then try accessing NetBox again.


_End of Lab Exercise 1