Have you tried something like following?

- name: wait for a url to work
ansible.builtin.get_url:
url: "https://myservice/";
dest: "/tmp/"
register: result
retries: 10
delay: 6
until: result.rc == 0

SInce your record is a json you should be able to pull that off easily.

Cheers,
*Kosala*




On Wed, Jun 21, 2023 at 6:26 AM Aharonu <aharon...@gmail.com> wrote:

> The play *(debug)* should execute every 1min and *percent_complete* will
> get changed every time till 100.
>
> When *percent_complete* is reached 100 for every record in the
> *variable_data*, the play should exit.
>
> Please help to achieve. Thank You.
>
>
>
> On Tue, 20 Jun 2023, 22:18 Aharonu, <aharon...@gmail.com> wrote:
>
>> Dear All,
>>
>> Could you please help with the below query.
>>
>> I have *variable_data *which contains 3 records. I want to keep run *debug
>> *task continuously every 1 minute until *percent_complete* == 100 and
>> then complete task execution.
>>
>> Please help to achieve my requirement. Thank you  in advance.
>>
>> TASK [debug] ***************************************************
>> ok: [cluster1] => {
>>     "variable_data.msg": {
>>         "num_records": 3,
>>         "records": [
>>             {
>>                 "percent_complete": 20,
>>                 "state": "in-progress",
>>                 "volume": "vol1",
>>                 "vserver": "svm1"
>>             },
>>             {
>>                 "percent_complete": 50,
>>                 "state": "in-progress",
>>                 "volume": "vol2",
>>                 "vserver": "svm1"
>>             },
>>             {
>>                 "percent_complete": 80,
>>                 "state": "in-progress",
>>                 "volume": "vol3",
>>                 "vserver": "svm2"
>>             }
>>         ]
>>     }
>> }
>>
>>
>> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CANGEjuVE_Dgg-rb9%2B15Uak%3DOywdi2Ts1HXXdWh40EY%3Do7iy89g%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CANGEjuVE_Dgg-rb9%2B15Uak%3DOywdi2Ts1HXXdWh40EY%3Do7iy89g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAP7S5HaDJVEHTg0mPV9boNn%2BCB_RadaAqNaxb8gXaxKFJA%2BS0g%40mail.gmail.com.

Reply via email to