Community,

I'm trying to loop through a tasks script until a task check does not fail. 
This is what I'd like to use:

- name: Retry startup
  include: retry.yml
  when: check|failed
  retries: 3
  until: not check|failed

The retry.yml script registers 'check' again to verify that the startup is 
successful. However, upon execution, only the first task in the retry.yml 
script gets run, the rest of the tasks are skipped entirely. Is this a 
bug/deficiency of the "include" module? I'd like the whole script to be 
retried instead of the first task. The method below functions, and does 
what I want but is not as clean.

- name: Retry startup 
  include: retry.yml
  when: check|failed

- name: Retry startup 
  include: retry.yml
  when: check|failed

- name: Retry startup 
  include: retry.yml
  when: check|failed

I know that ansible does not allow inlcude tasks to use 'with_items' or any 
sort of looping, I assume this is related.

Thanks,
Chip

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5e94b678-3375-4e1e-bb50-f3a0fddbd87c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to