Skip to content

Run task based on output of another task #857

Answered by dgarros
jms234 asked this question in Q&A
Discussion options

You must be logged in to vote

You can create a task to execute multiple tasks together, it should look similar to that

If both tasks are using Netmiko it will reuse the same connection automatically

def do_something_per_device(task: Task, *args, **kwargs) -> Result:
    result1 = task.run(task=netmiko_send_command, command_string="my command", *args, **kwargs) 
    result2 = task.run(task=second_task, *args, **kwargs) 

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@jms234
Comment options

Answer selected by jms234
Comment options

You must be logged in to vote
2 replies
@jms234
Comment options

@ktbyers
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants