This repository holds the course materials on Nornir, which is an ansible alternative.

View on GitHub


Filtering is about finding the hosts against which your scripts run.

The most important thing to remember is that filtering is cumulative.

In order to filter hosts in our home site you could call the following section.


In order to get our routers at home site you could call the.



In order to allow capturing the output of the actions into a file the following section needs to be passed to InitNornir either from via a file or in script.

nr = InitNornir(core={"num_workers": 50}, config_file="config.yaml",,logging={"file": "mylogs", "level": "debug"})

After this we can take a look at how Network automation can be done with nornir.