Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

Running a Task on Multiple Instances of an Integration - Playbook Optimization

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Running a Task on Multiple Instances of an Integration - Playbook Optimization

L1 Bithead

Hello,
we are working on a playbook that needs to run a single task on 10 different instances of the same integration. Currently, the only way we know to handle this is by creating a separate sub-playbook for each instance, with the task configured to run on each of the 10 instances. As a result, the main playbook consists of 10 separate sub-playbooks, one for each instance.

We would like to know if there is a more efficient way to run the same task on all instances of the same integration, without duplicating the sub-playbook for each instance.

We are aware that using sub-playbooks for each instance works, but we were wondering if there is a cleaner and less redundant solution for this.

Thank you!

3 REPLIES 3

L1 Bithead

Hi, it depends on the task you're running. You can use a single sub-playbook with inputs, extend the context, or similarly use a list. But it might be a bit hard to manage the outputs depending on the following actions you'd like to take. If you'd like it to run as a parallel execution, running on different sub-playbooks is also a good idea. So, if you could share the command/task you're running and elaborate on the following actions that will use the output, we can help more.

L1 Bithead

the solution is that there is option available to get the values from the context or the playbook inputs using {}. You can define comma separated values in playbook input, and use transformer in using to split the values. This might work.

L1 Bithead

Yes, that or/and the lists would work. However, you need a loop for it and the task will run one by one for the input you gave(instances). Depending on the output of the task, the playbook context might need some managing to make it usable for the following task(if that's the case). And since it runs as a single task, you can't run it parallel on many instances at the same time, so better to add a continue(or error path). 

  • 334 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!