Hi,
I want to execute certain tasks in loop until some condition satisfied.
Here is main module:
- name: Wait MainStatus Playbook
vars:
cosId: “{{realCosId}}”
jsonStatus: {“status”:‘in-progress’}
hosts: all
tasks: - name: Debug
debug:
msg: “{{jsonStatus.status}}” - name: Loop
include_tasks: waittask.yml
until: “‘{{jsonStatus.status}}’ ==‘in-progress’”
retries: 5
delay: 2 - name: Debug 2
debug:
msg: “{{jsonStatus.status}}”
It is executes task waittask.yml only once. However , variable jsonStatus still have value “in-progress”
Also , it is ignoring “delay” and “retries”
I tried “include” - result is the same
Any other options?
I want to executed tasks until some variable has certain value
Thanks,
Dmitriy