Polling URL using 'until' loop - how to get feedback during the loop

14 views
Skip to first unread message

Dick Visser

unread,
Jan 6, 2017, 9:09:07 AM1/6/17
to ansible...@googlegroups.com
Hi

My playbook imports a backup that takes a while, and that needs to be
finished before I continue with the rest.
I have created this task:

- name: "Poll backup import process"
uri: url=http://localhost:8090/setup/longrunningtaskxml.action?taskId={{
taskid }}
HEADER_Cookie="{{ wizard.set_cookie }}"
status_code=200
return_content=yes
register: longrunner_status
until: "'<currentStatus>Complete.</currentStatus>' in
longrunner_status.content"
delay: 5
retries: 1000


This works great.
But, during this task there is no output.
And because it takes a while, with lots of retries, the screen is
empty after a while, so it's hard to tell what's happening.

Is there a way to have output during the loop?

Thanks




--
Dick Visser
Sr. System & Network Engineer
GÉANT

Want to join us? We're hiring: http://www.geant.org/jobs

Brian Coca

unread,
Jan 6, 2017, 11:16:59 AM1/6/17
to ansible...@googlegroups.com
There was a bug on displaying retries, that should have been fixed in current versions.


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages