-
Hi, I can't seem to figure out how to pass in variables to Nornir tasks (for devices polled from Netbox). The main parts of the code are as follows:
I tried around with scrapli, that's why the connection options are there. I would want to be able to inject the port, and maybe other variables as well based on other script logic. The |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
It seems that by manually setting the
So I came up with:
I wonder if there are prettier ways of accomplishing this? |
Beta Was this translation helpful? Give feedback.
-
You can read about |
Beta Was this translation helpful? Give feedback.
It seems that by manually setting the
task.host.open_connection()
I can pass in arbitrary variables for the connection:So I came up with: