# Use loop control only when condition is met

**URL:** <https://forum.ansible.com/t/use-loop-control-only-when-condition-is-met/35953>\
**Category:** Ansible Project\
**Created:** [November 2, 2021, 6:27pm UTC](https://forum.ansible.com/t/use-loop-control-only-when-condition-is-met/35953 "2021-11-02T18:27:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aleksandar\_Ilic](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@Aleksandar\_Ilic](https://forum.ansible.com/u/Aleksandar_Ilic)\
**Post date:** [November 2, 2021, 6:27pm UTC](https://forum.ansible.com/t/use-loop-control-only-when-condition-is-met/35953/1 "2021-11-02T18:27:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 2, 2021, 8:00pm UTC](https://forum.ansible.com/t/use-loop-control-only-when-condition-is-met/35953/2 "2021-11-02T20:00:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [November 4, 2021, 3:26pm UTC](https://forum.ansible.com/t/use-loop-control-only-when-condition-is-met/35953/3 "2021-11-04T15:26:36Z")

</div>

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.
