Nornir: Introduction & Getting Started
Nornir is a pure Python automation framework for network engineers. It provides inventory management, task execution, and plugin support for network automation workflows.
Why Use Nornir?
- Automate network device configuration and validation
- Use Python for full programmability
- Integrate with other Python libraries and tools
How Nornir Works
- Inventory is defined in YAML or Python
- Tasks are Python functions (or plugins)
- Results are returned as Python objects for further processing
Quick Start Example
- Install Nornir:
- Create a simple inventory (
inventory/hosts.yaml
): - Write a basic script (
main.py
): - Run the script: