Ansible, Nornir or Terraform for network automation?
IntermediateProductionArchitecture Decisions and Tool Comparisons
Answer
- Ansible (
network_cli,netconf,httpapiconnections withcisco.ios,arista.eos,junipernetworks.junoscollections): the most common choice. Resource modules (for examplecisco.ios.ios_interfaceswithstate: merged|replaced|overridden) give declarative config, and network engineers can read YAML. - Nornir: Python framework, much faster for large device counts, full programming control. Better for teams with strong Python skills.
- Terraform: good for API-driven network services (cloud networking, SD-WAN controllers, firewalls with providers), not for CLI-based switches.
We start with Ansible for device config and backups, move hot paths to Nornir only when speed or complex logic demands it, and use Terraform for cloud networking.
More on Architecture Decisions and Tool Comparisons
Ansible or Terraform: where do you draw the line?BeginnerHow does Ansible compare with Puppet, Chef and Salt?IntermediateWhy use Ansible instead of shell scripts?BeginnerWhere does Ansible fit once you run Kubernetes?Intermediatecloud-init or Ansible for first boot configuration?IntermediateWhen would you use AWS Systems Manager instead of, or together with, Ansible?Intermediate