Skip to content
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.

Nornir configuration file

Khelil Sator edited this page Oct 26, 2019 · 4 revisions

The Nornir configuration file is config.yaml

$ python
Python 3.6.8 (default, Oct  9 2019, 14:04:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> from nornir import InitNornir
>>> nr = InitNornir(config_file="config.yaml")
>>> 
>>> nr.config.core.num_workers
30
>>> nr.config.inventory.options
{'host_file': 'inventory/hosts.yaml', 'group_file': 'inventory/groups.yaml', 'defaults_file': 'inventory/defaults.yaml'}
>>> exit()