Blog/Blog

Meet the NetBox Ansible Collection 4.0 for Ansible and Red Hat Ansible Automation Platform

|
3 min
Authors
Rich Bibby
Meet the NetBox Ansible Collection 4.0 for Ansible and Red Hat Ansible Automation Platform
Be the first to hear news and subscribe here.
Key links
Share

NetBox Labs today released a public preview of NetBox Ansible Collection 4.0. The new version offers significant upgrades, delivering 132 modules, including 42 new ones that cover models previous collections didn’t. The 4.0 release is generated from the NetBox data model, so support for each new NetBox release can follow within days.

Automation is only as good as your data. Teams that get the most out of open source Ansible or Red Hat Ansible Automation Platform pair it with a system of record: a single, accurate record of every device, connection, and dependency. NetBox holds the intended state of your infrastructure (sites, devices, interfaces, IP addresses, circuits), and Ansible and Red Hat Ansible Automation Platform make the network match it.

NetBox Labs plans to regenerate the collection for each NetBox release, so infrastructure leaders running Red Hat Ansible Automation Platform are less likely to see upgrades stall their automation. Teams can keep running playbooks against the system of record with fewer fixes of their own to maintain.

What’s new in NetBox Ansible Collection 4.0

Both Ansible and Red Hat Ansible Automation Platform make changes rapidly. The new version keeps the two in step: It follows NetBox releases closely, and it lets your playbooks reach far more of your system of record.

The 4.0 release delivers three major advantages for your teams:

Faster support for each new NetBox release

  • Move to new NetBox versions sooner, because collection releases follow within days.
  • Keep your existing playbooks: Playbooks written for 3.x keep working in most cases, and a migration guide covers what changed.

A collection you can standardize on

  • Use the new collection with confidence; NetBox Labs intends to submit it for Red Hat certification at general availability (GA).
  • Run on ansible-core 2.16 or later (tested through 2.22).

Broader NetBox coverage in your playbooks

  • Manage more NetBox objects from playbooks, as the number of modules grows from 90 to 132.
  • Replace custom API calls for models the 3.x collection doesn’t cover.

The inventory and lookup plugins have been rewritten. They keep the host variables, group names, and defaults from 3.x; fetch pages concurrently; check lookup terms and filters against the NetBox data model; and need no Python packages beyond ansible-core. Together with the modules, they enable you to:

  1. Build inventory from NetBox, grouped by site, role, platform, or a related object such as region or manufacturer.
  2. Generate configurations by pulling NetBox data into templates with the lookup plugin.
  3. Record what you build and add new devices, interfaces, and IP addresses to NetBox as part of a provisioning playbook, so the system of record stays accurate.

Try the public preview

The preview works with Community NetBox, NetBox Cloud, and NetBox Enterprise on NetBox 4.6 through 4.7.6. Like every release of the NetBox Ansible Collection, it’s free and open source under the GPL-3.0-or-later license.

The 3.x collection’s own integration suite passes 527 of 528 module tasks against 4.0. Every 3.x module and option name still works, with a deprecation warning, until 5.0. Until GA, Ansible Galaxy installs 3.x by default, so specify the version to install the preview:

ansible-galaxy collection install netbox.netbox:==4.0.0-rc.2

Get started and share your feedback

Install the preview, run it against your playbooks, and tell us what you find. Get started for free.