New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to have until
with loop
?
#44741
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
So I've finally realized that you try to access a list of results, but ---
- hosts: localhost
tasks:
- get_url:
url: https://github.com/file/file/archive/FILE5_34.tar.gz
dest: .
register: download
until: download.results | map('success')
delay: 3 Under each ---
- hosts: localhost
tasks:
- get_url:
url: "{{ item }}"
dest: .
register: download
until: download is succeeded
delay: 3
loop:
- https://github.com/file/file/archive/FILE5_34.tar.gz
- https://github.com/file/file/archive/FILE5_33.tar.gz It'll retry each of downloads separately. |
This comment has been minimized.
This comment has been minimized.
So we have a discussion ansible/proposals#140 and #44927 which demos the current behavior. |
SUMMARY
I have a
get_url
task that downloads a list of files. Sometimes the server is busy and a download might fail. I would like to useuntil
to retry the download.ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Arch linux
STEPS TO REPRODUCE
I would imagine sth like this:
But this obviously does not work.
The text was updated successfully, but these errors were encountered: