Closed raj15119 closed 2 years ago
Your config is most likely wrong, make sure it is correct.
Your config is most likely wrong, make sure it is correct.
Not sure what is wrong in config. This is output of config.yaml.
---
inventory:
plugin: SimpleInventory
options:
host_file: "hosts.yaml"
group_file: "groups.yaml"
defaults_file: "defaults.yaml"
runner:
plugin: threaded
options:
num_workers:5
@raj15119 That is wrong num_workers:5
You need a space between the number and the colon or else YAML will say it is a string (as opposed to a key-value pair).
@raj15119 That is wrong
num_workers:5
You need a space between the number and the colon or else YAML will say it is a string (as opposed to a key-value pair).
Thanks 🙏 @ktbyers it was the issue...
Hello Guys, I am getting this error.
This is my code:
from nornir import InitNornir from nornir_scrapli.tasks import send_command from nornir_utils.plugins.functions import print_result
nr = InitNornir(config_file="config.yaml")
results = nr.run(task=send_command, command="show version")
print_result(results)