The Best Open Source Tools for Network Automation
Tired of manual network changes? Discover the best open source tools for network automation – Ansible, NetBox & Python!

Updated: May 6, 2025
There's one thing I've learned after many years in networking: manual configurations don't belong in a modern IT environment. For every switch configured by hand, for every IP address copy-pasted, for every cable documented in a spreadsheet – you're building technical debt. Not just for yourself, but for the entire organization.
But there's a solution.
Open source tools have revolutionized how we manage networks. Automation is no longer something only large enterprises engage in; it's something any company can implement today. And for me, there are three tools that truly stand out:
✅ Ansible – for automating configurations and creating consistent networks ✅ NetBox – for documenting, tracking, and serving as a "Source of Truth" ✅ Python – for tying all the pieces together and building advanced automation workflows
Here's why these three tools are my favorites when it comes to network automation.
Ansible – put network configurations on autopilot
Ansible is the gold standard when it comes to network automation.
Instead of logging into each router and switch manually, you can use a single playbook to roll out configurations to hundreds of devices – consistently, repeatedly, and without errors.
Here's what makes Ansible great:
- Automation in practice: Ansible automates everything from routine tasks to complex changes. Think VLAN configurations, ACLs, policy routing, QoS settings, firmware updates, and more.
- Idempotency in focus: Thanks to its idempotent nature, Ansible ensures that changes are only made if necessary, minimizing the risk of unwanted side effects.
- Modules for everything: Ansible has a rich ecosystem of modules for interacting with various network devices and operating systems. For networking, this includes modules for Cisco IOS, Juniper Junos, Arista EOS, and many more.
- Role-based Playbooks: Through the use of roles, you can create reusable and modular playbooks that can be easily adapted and shared. For example, a role for configuring a BGP session can be easily reused in multiple playbooks.
- Reduced manual labor: Saves time and reduces the risk of human error.
- With Ansible, you can focus on strategic network decisions, instead of sitting and typing the same commands over and over again.
NetBox – Source of Truth for your network
The biggest problem with many networks? No one really knows what's out there.
NetBox solves that. It's a documentation tool for network infrastructure, but it's so much more than just a database. It acts as a Source of Truth – a central place where all information about the network is collected.
Why is this important?
→ Documents and tracks network changes
– so you always know what's there and what has changed.
→ Manages network assets
– switches, routers, IP addresses, VLANs – all in one place.
→ Integrates with automation tools
– so that changes in NetBox can drive Ansible and other systems.
Imagine adding a new router to NetBox and it's automatically provisioned by Ansible. That's real automation.
Python – the glue that holds everything together
Ansible is great. NetBox is powerful.
But to truly make network automation fly, you need a way to connect them – and that's where Python comes in.
With Python, you can:
- Custom scripts and modules: write your own scripts and modules to tailor automation flows.
- NetBox API Interaction: use Python to communicate with NetBox's API. Retrieve, update, and validate data.
- Dynamic Ansible orchestration: trigger Ansible playbooks based on data from NetBox or other sources.
- Advanced API interactions: by using libraries like requests or napalm, Python can easily interact with REST APIs and other interfaces offered by network devices.
And here's a really cool thing:
Imagine this: you make a change in NetBox, you add a new router or change an IP address. This change automatically triggers a webhook call to a REST API written in Python. The Python script then starts an Ansible job that performs the configuration changes.
Here's how the flow looks:
For larger networks: advanced queue management and workflows with Temporal
In larger, more complex network environments, simple webhook-triggered Ansible jobs are often not enough. Managing concurrency, error handling, and complex dependencies requires a more sophisticated solution. This is where Temporal.io comes in.
Temporal is a distributed, scalable, and reliable workflow orchestration system designed to manage long-running and robust processes. By adding Temporal to your automation architecture, you gain a range of benefits:
⇒ Robust queue management
Temporal acts as a centralized queue for all automation jobs. When an event occurs (e.g., a change in NetBox), the Python API sends a job to the Temporal queue instead of directly starting an Ansible job. Temporal guarantees that jobs are executed, even if errors or interruptions occur.
⇒ Guaranteed delivery
Temporal ensures that each job is executed at least once (at-least-once delivery). If a job fails, Temporal will automatically retry it according to a configurable policy (e.g., exponential backoff).
⇒ Concurrency handling
Temporal can limit the number of parallel Ansible jobs running simultaneously. This prevents overloading network devices and resources.
⇒ Workflows with dependencies
Sometimes network changes require a series of actions in a specific order. With Temporal, you can define complex workflows with dependencies between different automation steps.
⇒ Auditing and traceability
Temporal logs all events and decisions made during a workflow. This provides full traceability and makes it easy to troubleshoot problems.
⇒ Scalability
Temporal is designed to scale horizontally. You can easily add more Temporal nodes to handle a larger workload.
How it works in practice:
- #### Event Triggering
An event in NetBox (e.g., a new router created) triggers a webhook.
- #### Python API
The Python API receives the webhook call and creates a new job in Temporal. The job contains information about the action to be performed (e.g., "Configure router X").
- #### Temporal Workflow
Temporal places the job in the queue and ensures its execution.
- #### Python Workers
One or more Python workers subscribe to the Temporal queue. When a worker is free, it fetches a job from the queue.
- #### Ansible-runner Integration
The Python worker uses a tool like ansible-runner to execute the Ansible playbook that performs the actual configuration change on the network device.
- #### Reporting Back
When the Ansible job is complete, the Python worker reports back to Temporal. Temporal records the result and can potentially trigger the next step in the workflow.
Technical considerations
- Temporal Server: You need a Temporal server to host the workflow orchestration engine. This server can run on your own infrastructure or be hosted as a service.
- Temporal Client Libraries: You need Temporal client libraries for Python to interact with the Temporal server.
- Ansible-runner: Use ansible-runner or similar tools to run Ansible playbooks from within your Python workers.
- Workflow Definitions: You must define your automation workflows in Temporal using the Temporal API. Workflows can be defined in Python or other languages supported by Temporal.
Example flow with Temporal
Benefits of queue management
Queue management provides improved queue optimization, allowing larger networks to seamlessly handle parallel automation tasks without bottlenecks, enabling scaling by adding additional Python workers to monitor and execute jobs from the Temporal queue. Furthermore, this setup allows jobs to be queued during periods of high traffic, reducing the load on network devices and ensuring critical automation can be performed during off-peak windows.
Conclusion
By integrating Temporal into your network automation architecture, you can take a significant step towards a more robust, scalable, and reliable solution. Although it entails increased setup complexity, the benefits, in terms of centralized queue management, fail-safe operational guarantee, and the ability to define complex automated workflows, provide a significant return on investment for larger or critical networks. It provides a stable, reliable framework for constantly shifting needs, thereby enabling advanced automation sequences that synchronize perfectly with the Temporal ecosystem.
Need help getting started?
Open Source gives you the tools, but the right strategy is key. Ansible, NetBox, and Python are the best open-source tools for network automation according to me. But – the tools themselves don't do the work. It's about how you implement them, integrate them, and build an automation strategy that works for your network.
Do you want to get started with network automation, but don't know where to begin?
📩 Get in touch – we'll help you build a strategy that makes a difference!

Network automation, Cisco NSO or monitoring? I'll connect you with our network specialists.
Related articles

Mapping 120,000 devices: how we built a network discovery platform that keeps up
How we built a network discovery platform tracking over 120,000 devices: DNS zone transfers, Temporal, SNMP templates, MongoDB, topology from MAC tables, Jaeger, and a versioned FastAPI.

From Git to VM – how we build self-service with Proxmox and Crossplane
Proxmox, Crossplane and GitOps as the foundation for self-service on your own infrastructure. Read about Petter's PoC, what works today and the next steps.

Building a Kubernetes Platform Without Vendor Lock-In
How do you build a container platform that can evolve over time? Brian Levinsen discusses solution design, OpenShift, GitOps, and minimizing vendor dependencies.


