
Master NetBox automation using Ansible and Python through hands-on demos that build a production-ready source of truth data model from scratch.
Visualize the final NetBox data model and learn to automate your network infrastructure with Ansible and Python, modeling sites, racks, devices, circuits, IPAM, VRFs, VLANs, and provisioning contexts.
Apply NetBox's design philosophies: replicate the real world with a strict data model, assign IP addresses to interfaces, and keep NetBox as the authoritative, API-driven source of truth.
Explore how NetBox started as an open-source, vendor-neutral source of truth for network documentation, born from DigitalOcean’s 2015 challenges and later shaped by NetBox Labs and community.
Adopt a TikTok-style NetBox release strategy, using even tick releases for non-breaking updates and odd releases for breaking changes, with about an eight-month gap.
Explore NetBox installation options for learning, including a local docker setup on macOS and Windows via WSL. Also review cloud options such as AWS EC2 and NetBox cloud free plan.
Renames netbox api v2 environment variables to netbox_local_token and netbox_token, dropping v1 support; updates env and example files, inventory, and scripts, and verifies connectivity with Python and Ansible playbooks.
Set up Windows 11 with WSL, Ubuntu, and Docker Desktop to install and run NetBox Docker. Clone the NetBox Docker repository, pull images, start containers, and create an admin user.
Learn to set up a windows-based netbox automation environment using Visual Studio Code, WSL, uv, and Ansible, clone the repository, and verify NetBox connectivity with test scripts.
Install netbox docker on macos using docker desktop, git, and docker-compose; start postgres and netbox containers, access the netbox UI at localhost:8000, and create an admin user.
Set up a macOS automation environment by installing Visual Studio Code and uv-environment-manager, cloning the course project, and testing Python and Ansible with a script using a .env token file.
Install a netbox docker instance on aws ec2 using ubuntu and docker engine. Configure security with ssh and port 8000 access, and validate with api tokens and an ansible playbook.
Learn to set up NetBox cloud free plan, verify identity with a credit card, and use a fully managed instance with limits on devices, IPs, API calls, plus pay-as-you-go options.
Access the public NetBox demo instance for quick testing without setup. Create a netadmin user, sign in, and explore sample data and devices, noting nightly resets and one-day retention.
Explore NetBox architecture in Docker: the core application, Postgres, Redis queue and cache, and the NetBox worker. See container networking and how Redis coordinates background tasks.
Learn how to manually add a device to NetBox, understand data relationships and the hierarchical structure, and set up the prerequisites of site, manufacturer, device type, and device role.
Explore NetBox data relationships and hierarchical structure for reliable automation. See how devices relate to sites and regions, and how interfaces, IP addresses, prefixes, VRFs, VLANs, and roles interlink.
Build a NetBox organization by creating tenant groups, tenants, regions, site groups, sites, and locations, using manual setup and CSV bulk imports with hierarchical structures.
Learn how NetBox Copilot works in the community edition as an AI assistant for natural language queries, generating playbooks and Python scripts, with enterprise features on the horizon.
Explore git-style branching in NetBox, creating isolated branches, making changes, and merging back to main via change requests and reviews with policy-driven approvals.
Explore the NetBox REST API and Swagger UI to access app-level endpoints, apply advanced filters, and perform get, post, put, and patch operations against devices, sites, and circuits.
Learn how to use postman to interact with the NetBox REST API, create collections and environments, configure bearer token authentication, and test endpoints like status and sites.
Compare netbox api token version 1 and 2, highlighting v2’s bearer authentication, hmac-based tokens, salted hashes, and enhanced security while noting backward compatibility and eventual removal.
Learn how the NetBox REST API options method reveals allowed operations without modifying data, enabling dynamic field validation and choice discovery for automations and site decommission scripts.
Learn to use post, put, and patch requests against the NetBox API, showing creation with mandatory fields, full updates with put, and partial updates with patch through practical site examples.
Learn how to bulk create and update NetBox objects using POST, PUT, and PATCH with the NetBox API, including list-form data, changelog entries, and verification of new IDs.
Learn how to perform bulk deletion of NetBox objects via the NetBox API using Postman by passing a list of IDs and validating removals.
Learn to use brief format in the NetBox REST API to return a minimal object representation, such as id, name, slug, and description, reducing payload and speeding up large-scale automations.
Learn how NetBox handles API response pagination, including max page size, default 50 per page, and how Ansible and Pynetbox manage pagination to fetch all objects.
Configure an Ansible inventory to manage multiple NetBox instances (local, cloud, AWS) using URLs and tokens from .env, and create sites across all deployments via the NetBox module.
Connect to the Netbox API using the Python Request Library to fetch endpoint options, set up headers from environment variables, and print status choices for dynamic discovery and validation.
Automate NetBox site creation with an Ansible playbook that reads csv, yaml, or json data. Utilize the netbox_site module to define name, region, site group, and tenant, ensuring idempotent changes.
Learn to delete NetBox locations and sites with an Ansible playbook by fetching all items via the NetBox API, iterating results by name, site, and slug, and handling pagination.
Learn to perform a bulk delete of NetBox sites by extracting IDs with Ansible, constructing a list of id dictionaries, and calling the API delete endpoint with authorization headers.
learn to handle NetBox API pagination with Ansible by looping through pages, collecting all sites data, and using next page logic.
Learn to use the NetBox lookup plugin to query NetBox data with query filters, apply single and multi-condition filters, pass variables, and run filtered data in Ansible tasks.
Use yaml anchors and aliases in Ansible to share variables across NetBox api tasks, reducing repetition and merging values into json outputs for sites, locations, and site groups.
Explore PyNetBox, the official Python API client for NetBox, and learn how it abstracts HTTP requests for easy CRUD operations, pagination, filtering, and bulk actions on NetBox objects like sites.
Create NetBox sites from a CSV using Pynetbox in Python. Convert CSV rows into dictionaries and pass them to sites.create with name, slug, status, region, and group.
Learn to update and sync NetBox sites from a CSV using PyNetBox, handling existing sites with an idempotent-like approach that uses GET, POST, PATCH, and conditional create or update.
Implement custom idempotency with PyNetBox to update NetBox sites only when changes occur, avoiding patch requests by comparing CSV data with site fields like name, status, description, region, and tenant.
Learn to use Pynetbox filters to query NetBox, including active sites, regional filters, id lookups, not-equal tests, and multi-condition queries, with generator behavior and counting results.
Get object counts in NetBox efficiently with Pynetbox by using the lightweight site.count method, including applying filters to tally active sites even in large datasets.
Understand the difference between filter and get in Pynetbox: filter returns multiple results as a record set, while get returns a single object. Apply fail-fast validation to catch inconsistencies.
Reset the NetBox environment by deleting tenants, tenant groups, region, site groups, sites, and locations using a PyNetBox script in the NetBox automation with Ansible & Python masterclass.
Automate NetBox organizational hierarchy by creating tenant groups and regions with Ansible and Python, importing from CSV files, and resetting and rebuilding data as needed.
Automate NetBox data management by creating tenants, site groups, sites, and locations with an Ansible playbook, reading structured CSV data for corporate division and customer A.
Create contact groups, roles, and contacts in NetBox by manual import or an Ansible playbook, using CSV data in org root and tenant level, then verify site assignments.
Learn to assign contacts to NetBox objects using Ansible playbooks, defining contact roles, groups, and priorities. Practice CSV import and object-level mapping with sites and a reset script.
Master building a complete NetBox organizational hierarchy with a single Ansible playbook, combining tenants, regions, site groups, sites, locations, and contact assignments from CSV data.
Create a complete NetBox organizational hierarchy with a single Python script using PyNetbox, reading CSV data from org root to build tenant groups, regions, sites, locations, and contact assignments.
Learn to create and manage racks in NetBox using csv import, including manufacturers, rack types, and rack roles, and prepare for automation with ansible and python.
Create rack manufacturers and rack roles in netbox using data from the ansible_data directory and the device manufacturer and rack role modules, with slug, color, and description.
learn to create rack types in NetBox using the Ansible URI module via the NetBox API, with CSV data, Swagger validation, and handling idempotency limitations until a module exists.
Learn how to create racks at scale in NetBox using Ansible URI, mapping rack types via API, and handling idempotency, pagination, and errors while building a racks creation playbook.
Implement a basic idempotent rack creation workflow in NetBox with Ansible and Python: read racks from a CSV, check existence, then POST or PATCH accordingly.
Orchestrate end-to-end rack provisioning with a single Ansible playbook, combining manufacturer, role, rack type, and rack creation via NetBox API while demonstrating idempotency and script execution.
Learn end-to-end rack orchestration in NetBox using a single Python script, including a reset, payload creation, and automated creation of manufacturers, rack roles, rack types, and racks.
Explore manual device onboarding in NetBox via CSV import, define manufacturers, device roles, platforms, and device types, and import a single device into a rack with an optional name.
Provision device manufacturers and device roles in NetBox using an Ansible playbook that reads csv data and creates manufacturers and device roles with name, slug, color, and description.
Programmatically download NetBox device types and module types from the community GitHub using an Ansible playbook, with Arista and Cisco examples.
Learn to download NetBox community library device and module types with a Python script, mirroring the Ansible approach, including directory setup, parsing a vars file, and robust download logic.
Build and run a NetBox custom device type importer with a Python script and Ansible playbook, creating manufacturers, building payloads, and syncing interfaces, module bases, and console and power ports.
Define device platforms with an Ansible playbook by reading a CSV and creating platforms (name, slug, manufacturer) via the NetBox platform module.
Add devices to NetBox using an Ansible playbook, reading a CSV and populating the NetBox device module with name, device type, site, rack, rack position, tenant, and status.
Automate end-to-end device provisioning in NetBox with Python, deleting old data and recreating 95 devices from a CSV, including device types, roles, and platforms via a sync resource workflow.
Adopt a clear device assignment strategy in NetBox by standardizing names (site–role–number), mapping models to device roles, and importing device and module types with Python scripts and Ansible.
Master the ultimate Network Source of Truth and Automation Orchestrator.
This course is meticulously designed for professionals across the entire infrastructure spectrum, ranging from traditional networking roles to modern automated operations:
Network Engineers & Administrators: (Junior, Senior, and Principal levels) looking to replace manual spreadsheets with a professional Source of Truth.
Network Architects & Design Engineers: Professionals responsible for infrastructure planning, IPAM strategy, and high-level physical/logical modeling.
NetDevOps & Automation Engineers: Anyone specializing in Ansible, Python, or Infrastructure as Code (IaC) to drive network consistency.
Data Center & Infrastructure Engineers: Teams managing large-scale physical assets, rack layouts, and complex cable modeling.
Implementation & Support Engineers: Professionals who need to ensure accurate, data-driven deployment and troubleshooting.
Site Reliability Engineers (SRE) & Cloud Architects: Those bridging the gap between traditional networking and automated cloud/hybrid infrastructure.
Software & Python Developers: Programmers who are building internal tools, portals, or integrations that interact with network inventory systems.
Automation Enthusiasts: Anyone eager to master the industry-standard tool for Network Source of Truth and modern orchestration.
Certified Professionals: An essential skill-up for those holding CCNA, CCNP, CCIE, CCDE, or DevNet certifications who want to apply their knowledge programmatically to NetBox
Environment & Tools:
Platforms: Windows (Docker/WSL), MacOS, and AWS EC2 deployment.
IDE: VS Code with Python UV for modern environment management.
Automation: Ansible (latest collections), Python (Requests & PyNetBox), and NetBox API v2.
Hands-On: Access to NetBox Labs Cloud and local Docker-compose setups.
Comprehensive Syllabus & Topics Covered
Introduction
What is Netbox
NetBox Design Philosophy
How NetBox Started
NetBox Release Strategy
NetBox Installation Options
Windows Docker Installation
Windows VS Code and Automation Environment Setup
MacOS Docker Desktop NetBox Installation
MacOS VS Code and Automation Environment Setup
AWS EC2 NetBox Docker Installation
NetBox Labs Cloud Instance Access
How to access NetBox Public Demo instance
NetBox architecture Explained
Build Your First Inventory
Add your first inventory to NetBox
Add your first inventory to NetBox
Add device with minimal data
Add sites, device type, manufacturer, role etc
Explanation About NetBox Data relationships
Importance of understanding NetBox data relationships
Strategic Planning and Design
How to import data using CSV
Add Organizational data using csv
Tenant groups, tenant, regions, sites, locations using csv
Import device data using csv
NetBox Co-pilot and Branching
NetBox Co-pilot feature Explained
Enable copilot in Community Edition
NetBox Branching Feature
Git-style Branching for NetBox
NetBox REST API
NetBox REST API Explained
REST API using Postman
NetBox Token V1 vs V2
Get Netbox API OPTION
POST, PUT and PATCH Example
NetBox Bulk create using API
NetBox Bulk Delete using API
NetBox API Object Brief
Handle Pagination in NetBox API
Ansible & Python For NetBox Automation
Ansible inventory file setup for Automation
Add NetBox v1 and v2 token in to netBox
Add Netbox url and host details
NetBox API automation using Python Request module
Create Sites from CSV, YAML and Json - Ansible Example
Sites Delete -Ansible Example
Bulk Delete using Object ID - Ansible
Handle Pagination - Solving Pagination Puzzle
NetBox Query Filter Ansible Example
Ansible Anchors & Alias for NetBox Credentials
PyNetBox - Official Python Library for NetBox Automation
PyNetBox Introduction - For Netbox automation
Create Data From CSV using Pynetbox
Update & sync site using PyNetBox
Custom Idempotency using PyNetBox
PyNetBox Filtering Example
Get Object Count using Pynetbox
Get vs Filter in PyNetBox
Full Organizational Data reset using Python script
Setup the Organizational Data
Create Tenant Groups & Regions
Create Tenants, Sites & Locations
Create Contacts
Contact Assignment to Objects
Organizational Hierarchy with Single Playbook
Organizational Hierarchy with Single Python Script
Rack Modeling in NetBox
Rack Creation via CSV import
Import Rack Manufacturers & Rack Roles
Add Rack Types using Ansible URI
Creating Racks at Scale using Ansible URI
Idempotency in Rack creation
End to End Rack Orchestration using Single Playbook
End to End Rack Orchestration using Single Python Script
Device Inventory & Data Modeling in NetBox
Manual device Onboarding and CSV Import
Provisioning Device Roles and Manufacturers using Ansible
Programmatic Device types retrieval - Ansible
Programmatic Device types retrieval - Python
Custom Device type importer
Create Device Platforms via Ansible
Add Device using Ansible
End to End Device provisioning with Python
Device Assignment Strategy Explained
Modular Systems & Chassis Modeling
Assign Chassis Modules to Device Slots (Cisco Modular Device) - manual step
Assign Chassis Modules to Device Slots (Cisco Modular Device) -Ansible
Assign Chassis Modules to Device Slots (Cisco Modular Device) - Python
Config Context & Config Templates
Create Config Context and Config Context Profiles
Demo of rendered Context
JSON Schema using Context profiles
What is Context Weight
Render device configuration using Config Templates
NetBox as a Dynamic Ansible Inventory & Source of Truth
NetBox Inventory Plugin
Query Filter and Device Query Filter
Ansible Inventory for Gathering Device Facts
Import POC Lab Device Roles, Platforms and Sites
Discover devices to Netbox using Ansible
Assign Primary IP to devices using Ansible
Provision Config Context and Config Templates -Ansible
Assign Config templates to the devices
Deploy rendered Config to the Device using Ansible
NetBox Dynamic Inventory for Ansible
Cleanup the POC Lab data
Cabling, Power & Circuits Modeling in NetBox
Connect Interface Cables to the Devices - Manual
Connect Interface Cables to the Devices - Ansible
Add Power Panels and Power Feeds
Add Power Distribution Unit(PDU) Device Types
Create PDU Devices
Create Power Cables
Create Circuits, Providers and Terminations
Create Circuits, Providers and Terminations - Python
Connect Circuit Terminations to Site Devices
VLAN & IPAM
Create VLANs and IP Prefixes - Manual
Automating VLANs and IP Prefixes Creation - Ansible
Create VLAN SVI Interfaces in Devices
Assign VLANs to Device Interfaces
Auto assign Management IPs to Devices
VPN & Wireless
NetBox VPN Modeling - Create Tunnel Interfaces and IPs for VPN
Create IPSec Profile - Manual
Create IPSec Profile - Automation
Create DMVPN Tunnel Terminations
Create Wireless Groups & WLANs
Virtualization & Server Modeling
Virtual Machine Modeling - Import Server Device Types
Virtual Machine Modeling - Create Server Devices
Connect Server Cables to the Switch
Create Port-Channel Interfaces in the Switch for Servers
Create Server Clusters
Create Virtual Machines
Assign IP Addresses to the VMs
Customization Options in NetBox
Create NetBox Custom fields - Manual
Create NetBox Custom fields using Automation
Filter Devices with Custom Fields - Ansible Example
Create Custom Links - Manual & Ansible Examples
Create Export Templates
Download Export Template Rendered Data - Automation
Saved FIlters
Table Config
Tags
Image Attachments
NetBox Journal Entries
NetBox Webhook and Event Rule
Data Source Options - AWS S3, Git & Local
NetBox Data Sources - Setup Local Data Source
NetBox Data Sources - Setup AWS S3 Data Source
NetBox Data Sources - Setup GitHub Data Source
Custom Scripts in NetBox
Custom Scripts Intro and Bulk Device Creation Example
Bulk Device Delete using Custom Scripts
Bulk Device Update using Custom Scripts
Basic Compliance Check using Custom Scripts
Tag Assignment Example
NetBox Plugins: Installation & Configuration
Plugins Introduction and Installation Step Overview
Install NetBox BGP Plugin
Install Topology View Plugin
NetBox Diode Installation & Configuration
What is NetBox Diode and Setup Overview
Setup Diode Container
Setup Orb Agent and Discover the devices