The Best Open Source Tools for Network Automation
- Christopher Juhlin
- Mar 26
- 5 min read
Updated: Apr 1
There is one thing I've learned after working with networks for many years: manual configurations have no place in a modern IT environment. For every switch you configure by hand, every IP address you paste in, every cable you document in a spreadsheet – you're building technical debt. Not just for yourself, but for the entire organization.
But there is a solution.
Open source tools have revolutionized the way we manage networks. Automation is no longer something only large enterprises do – it's something every company can implement today. And for me, there are three tools that truly stand out:
✅ Ansible – to automate configurations and create consistent networks ✅ NetBox – to document, track, and serve as a “Source of Truth” ✅ Python – to tie everything together and build advanced automation workflows
Here’s why these three tools are my personal 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 every router and switch manually, you can use a single playbook to roll out configurations to hundreds of devices – consistently, repeatably, and without errors.
Here’s what makes Ansible awesome:
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 at its Core: Thanks to its idempotent nature, Ansible ensures that changes are only made when 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: By using roles, you can create reusable and modular playbooks that are easy to customize and share. For example, a role for configuring a BGP session can be easily reused across multiple playbooks.
Reduced Manual Work: Saves time and lowers the risk of human error.
With Ansible, you can focus on strategic network decisions instead of 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 there.
NetBox solves that. It’s a documentation tool for network infrastructure – but it’s so much more than just a database. It serves as a Source of Truth – a central place where all information about the network is collected and maintained.
Why is that important?
→ Documents and tracks changes in the network
– so you always know what exists and what has changed.
→ Keeps track of network assets
– switches, routers, IP addresses, VLANs – all in one place.
→ Integrates with automation tools
– so changes in NetBox can drive Ansible and other systems.
Imagine adding a new router in NetBox and having it automatically provisioned by Ansible. That’s real automation.
Python – The Glue That Holds Everything Together
Ansible is awesome. NetBox is powerful.
But to truly make network automation take off, 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 workflows.
NetBox API Interaction: Use Python to communicate with NetBox’s API – fetch, update, and validate data.
Dynamic Ansible Orchestration: Launch Ansible playbooks based on data from NetBox or other sources.
Advanced API Interactions: With libraries like requests or napalm, Python can easily interact with REST APIs and other interfaces provided by network devices.
And here’s a really cool thing:
Imagine this: You make a change in NetBox – add a new router or update an IP address. That change automatically triggers a webhook call to a REST API written in Python. The Python script then kicks off an Ansible job to apply the configuration changes.
Here’s what the flow looks like:

For Larger Networks: Advanced Queuing 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 into play.
Temporal is a distributed, scalable, and reliable workflow orchestration system designed to handle long-running and robust processes. By integrating Temporal into your automation architecture, you gain several key 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 triggering an Ansible job. Temporal ensures jobs are executed—even in the case of failures or interruptions.
⇒ Guaranteed Delivery
Temporal ensures that every job is executed at least once. If a job fails, it will automatically retry based on a configurable policy (e.g., exponential backoff).
⇒ Concurrency Control
Temporal can limit how many Ansible jobs run in parallel. This prevents overloading network devices and system resources.
⇒ Workflows with Dependencies
Sometimes network changes require a sequence 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 throughout a workflow. This provides full traceability and makes troubleshooting much easier.
⇒ Scalability
Temporal is designed for horizontal scaling. You can easily add more Temporal nodes to handle higher workloads.
How It Works in Practice:
Event Triggering
An event in NetBox (e.g., a new router is 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 it is executed.
Python Workers
One or more Python workers subscribe to the Temporal queue. When a worker is available, it pulls 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
Once the Ansible job is complete, the Python worker reports the result back to Temporal. Temporal logs the outcome and can optionally 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 be self-hosted on your own infrastructure or hosted as a service.
Temporal Client Libraries: You’ll need Temporal client libraries for Python to interact with the Temporal server.
Ansible-runner: Use ansible-runner or a similar tool to run Ansible playbooks from within your Python workers.
Workflow Definitions: You’ll need to define your automation workflows in Temporal using the Temporal API. Workflows can be written in Python or any other language supported by Temporal.
Example Flow with Temporal:

Benefits of Queue Management
Queue management offers improved queue optimization, allowing larger networks to handle parallel automation tasks seamlessly without bottlenecks. It enables scalability by simply adding more Python workers to monitor and execute jobs from the Temporal queue. Additionally, this setup allows jobs to be queued during high-traffic periods, reducing the load on network devices and ensuring that critical automation can be carried out during low-traffic windows.
Conclusion
By integrating Temporal into your network automation architecture, you take a major step toward a more robust, scalable, and reliable solution. While it adds complexity to the setup, the benefits—in the form of centralized queue management, fault-tolerant job execution, and the ability to define complex automated workflows—offer a strong return on investment for larger or mission-critical networks. It provides a stable, dependable framework for ever-changing demands, enabling advanced automation sequences that are perfectly synchronized within the Temporal ecosystem.
Need Help Getting Started?
Open source gives you the tools, but the right strategy is the key. Ansible, NetBox, and Python are, in my opinion, the best open-source tools for network automation. But – the tools alone won’t do the job. It’s about how you implement them, integrate them, and build an automation strategy that fits your network.
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!
コメント