Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Start here

From Intent to Execution: Nautobot and Ansible, Better Together

Welcome to this workshop, where we explore how Nautobot and Ansible can coexist, complement, and enhance each other.

You are going to have access to two repositories:

  • nautobot-ansible-workshop-guide This is the current repository and has all the steps that you are going to follow as part of the workshop. Start here, review the README, and it will take you to each lab.
  • nautobot-ansible-workshop This repository has all the files that are used in the different labs; we will explore it in detail as we move along.

Getting access to the lab

Everything you need is already running. You will not install anything. You will receive a URL and a set of credentials for your lab environment. Use those in your browser to access the virtual machine with everything you need. You should see the desktop of the virtual machine like this: image.png

The URL/IP in the image is just an example to show you how your browser is going to look like when you get there. But, you are going to receive your own address.

From this desktop you will be able to use Firefox to navigate to both Nautobot and AWX and on the bar at the bottom you can access a terminal.


You'll work in three places

Keep all three open. Every step in every lab is labeled with which one it means, so you never have to guess where to click or type.

Icon What it is Where
💻 TERMINAL Terminal window on the desktop. Runs ansible-playbook and ansible-inventory by hand. The bar at the bottom of the desktop
🤖 NAUTOBOT Browser tab. The source of truth — devices, IPs, variables, intent. http://localhost:8001
⚙️ AWX Browser tab. The orchestration layer — job templates, inventories, workflows. http://localhost:8013

🤖 is Nautobot's own robot, ⚙️ is the machinery that runs things, 💻 is your shell. Once you have those three, you never need to read a step twice to work out where it happens.

Open a terminal window from the bar at the bottom of the desktop. It runs on the same machine as Nautobot and AWX, so there is nothing to connect to — the lab repo, Ansible, and the settings below are already there. Start every lab from the repo:

cd ~/nautobot-ansible-workshop

Why a terminal at all, when AWX can run everything? Because seeing the same playbook work from both places is the point. The terminal shows you what is happening; AWX shows you the same thing with credentials, logging and RBAC wrapped around it. The playbook never changes between them.

Two browser tabs, one terminal. You'll switch between them constantly — a lab will typically change something in Nautobot, prove it from the terminal, then show the same result in AWX.

Credentials

admin / admin. Everywhere. That's the whole table.

System Username Password
Nautobot admin admin
AWX admin admin
Devices (leaf1, leaf2) admin admin
Nothing to look up, nothing to remember; you can navigate freely between the different tools.

Already set for you in the terminal, so most commands just work:

Variable Value
NAUTOBOT_URL http://localhost:8001
NAUTOBOT_TOKEN 0123456789abcdef0123456789abcdef01234567
AWX_HOST http://localhost:8013

Your devices

Device IP Platform
leaf1 172.20.20.11 Arista cEOS 4.33.10M
leaf2 172.20.20.12 Arista cEOS 4.33.10M
These are the real addresses — the same for every attendee in the room. You can copy and paste any command in the labs exactly as written.

How the pieces fit together

graph LR
    you["You"]
    nautobot["<b>Nautobot</b><br/>the source of truth<br/>what the network<br/><i>should</i> be"]
    awx["<b>AWX</b><br/>the orchestrator<br/>runs the automation"]
    leaf1["<b>leaf1</b><br/>172.20.20.11"]
    leaf2["<b>leaf2</b><br/>172.20.20.12"]

    you -->|"browser"| nautobot
    you -->|"browser"| awx
    nautobot -->|"inventory, variables,<br/>intent"| awx
    awx -->|"configures"| leaf1
    awx -->|"configures"| leaf2
    leaf1 -.->|"discovered state<br/>written back"| nautobot
    leaf2 -.-> nautobot
    nautobot -.->|"an event fires<br/>a workflow"| awx
Loading

Solid arrows are what exists at the start. Dotted arrows are what you'll build: writing discovered state back into Nautobot (Lab 3), and letting a change in Nautobot trigger automation (Lab 4).


The three and a half hours

Time What
0:00–0:15 Cold open — onboard a site the painful way
0:15–0:55 Lab 1 — Nautobot as your inventory
0:55–1:35 Lab 2 — variables and intent
1:35–1:50 Break
1:50–2:35 Lab 3 — execute, and write state back
2:35–3:20 Lab 4 — event-driven, with an approval gate
3:20–3:30 Wrap and Q&A
  1. Lab 0 — Cold open
  2. Lab 1 — Nautobot as inventory
  3. Lab 2 — Variables and intent
  4. Lab 3 — Execute and write back
  5. Lab 4 — Event-driven with an approval gate

How the labs are written

One path through each lab, lettered a, b, c… Follow all the steps of each lab in order. Every step says which of the three places above it happens in, and every command and value is printed in full. You should never have to look anything up or guess.

Each lab then ends with stretch goals. Several of stretch goals are harder, if you finish early and want to explore more on your own. They are genuinely optional. Nothing later depends on them, and you can come back after the session.

Everything is pre-built. You change settings: flip a dropdown, edit a field, press a button. You never have to write a file from scratch or push to git. That's deliberate: it keeps the session about the ideas, not about typing.

If you get stuck

Raise a hand. There are proctors in the room, and being stuck for five minutes is five minutes not spent learning.


Two things worth knowing before we start

This is not really a workshop about AWX. It's about the orchestration layer. Job templates, workflows, approval nodes, credentials and execution environments are the same objects in Ansible Automation Platform — if you run AAP at work, everything here applies directly. We use AWX in the lab only so that nobody needs an AAP license to attend.

And yes — AWX hasn't had a tagged release since July 2024. That looks like an abandoned project. It isn't. The AWX README states that releases are "paused during a large scale refactoring" toward a pluggable, service-oriented architecture, and development continues on the devel branch.


Taking it home

Everything you build today is in a repository you keep and it includes the notes you'd need to rebuild this environment yourself. We have prepared an environment that is ready for you to start experimenting and learning but there is nothing there that you could not replicate on your own. We come back to it at the end of Lab 4.

Next step

You are ready to start working. Jump to Lab 0 — Cold open and start working your way through. Good luck and have fun!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors