Use loop control only when condition is met

Hello everyone,

Im new to ansible and im trying to use loop_contorl pause only for specific item.

Is this something that is possible to do ?

Thanks

pause gets calculated before the looping starts so it cannot be set per item

Given what Brian pointed out, you can achieve the same effect by using include_tasks where the tasks file contains the task you want to loop over followed by a conditional invocation of the pause module. Here’s a sample playbook with some data. Note that the 3rd item has a non-zero pause value.