Instructions for serial plugin in Nornir 3.1.0? #675
Unanswered
lucasmarcel
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I just tested your example and works fine. Are you sure you are passing the correct You can also try this: from nornir.init_nornir import InitNornir
from nornir.plugins.runners import SerialRunner
nr = InitNornir(config_file="config.yaml")
def mytask(task):
import ipdb; ipdb.set_trace()
print("In mytask")
nr.with_runner(SerialRunner()).run(task=mytask) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I set
in config.yaml. I then inserted
import ipdb; ipdb.settrace()
in my custom task to troubleshoot, but the script doesn't stop at the first invocation of the custom task for the first host as expected. Instead, it seems to loop through all the hosts and calling my custom task in rapid succession.Is there another configuration to change to have nornir process the hosts one by one when troubleshooting?
I tried:
but it didn't work either.
My code in a nutshell:
Beta Was this translation helpful? Give feedback.
All reactions