Skip to content

Send Result of sub-task to another sub-task #812

Answered by dbarrosop
davama asked this question in Q&A
Discussion options

You must be logged in to vote

You have two options:

  1. store the data in the host itself (something like task.host["interface_to_vlan_data"] = interface_to_vlan_data
  2. group tasks together, something like:
def my_super_task(task: Task, ...) -> Result:
    result1 = task.run(some_task)
    result2 = task.run(some_other_task, some_arg1=result1)
    result3 = task.run(yet_another_task, some_arg2=result2)
   ...

Replies: 2 comments 2 replies

Comment options

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

Answer selected by davama
Comment options

You must be logged in to vote
1 reply
@davama
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
2 participants