# Iterate loop first then retries after iterate

**URL:** <https://forum.ansible.com/t/iterate-loop-first-then-retries-after-iterate/35820>\
**Category:** Ansible Project\
**Created:** [October 5, 2021, 2:35pm UTC](https://forum.ansible.com/t/iterate-loop-first-then-retries-after-iterate/35820 "2021-10-05T14:35:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiger\_Kaovilai](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tiger\_Kaovilai](https://forum.ansible.com/u/Tiger_Kaovilai)\
**Post date:** [October 5, 2021, 2:35pm UTC](https://forum.ansible.com/t/iterate-loop-first-then-retries-after-iterate/35820/1 "2021-10-05T14:35:57Z")

</div>

Is there a way in a playbook to iterate through loop first and retry each that failed later?

This would reduce amount of retires and delays needed when items in the loop do not need to be executed sequentially.

- name: “check if items exist”  
lookup\_something\_module: “{{ item }}”  
loop: “{{ loop\_items }}”  
register: crds  
until: crds.resources | length \> 0  
retries: 30
