You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently no way to use win_get_url and be sure that the expected file is in place without doing extra HTTP requests that waste resources.
If using a checksum and force=true (which to me is a surprising default) the file is always re-downloaded, which if it is pointed to public download sources is inefficient and consumes other peoples resources for no good reason. If force=false a HTTP HEAD request with If-Modified-Since is done, but this is not always enough to ensure that the correct file is downloaded (the local file might have a later modification time than the file on the server).
ISSUE TYPE
Feature Idea
COMPONENT NAME
win_get_url
ADDITIONAL INFORMATION
There are two ways in which the behaviour of the posix get_url module is better:
If the dest file exists and has the correct checksum no HTTP request is done. I cannot see a reason why doing a HTTP request in this case actually makes sense.
If dest exists and checksum is different from what is passed in it works as if force=true was passed. Which means you cannot end up in the situation that the module returns ok/no change while the file on disk has a different checksum than what is requested.
If win_get_url was changed to do these two things we could set force=false and be confident that the contents of dest is the file corresponding to the checksum.
- hosts: somewhere.example.invalidbecome: notasks:
- win_get_url:
url: https://otherplace.example.invalid/~kbj/tmp/hello.txtdest: C:/Windows/Temp/greeting.txtchecksum: f572d396fae9206628714fb2ce00f72e94f2258fforce: false
- name: This does not actually make sure greeting.txt has the expected checksumwin_get_url:
url: https://otherplace.example.invalid/~kbj/tmp/hei.txtdest: C:/Windows/Temp/greeting.txtchecksum: b7a7bf03dcafd4d48001d6a2a6fd2ceaefa4cc1eforce: false
This is obviously a contrived example, but replace dest with SomeSoftware.zip and the URLs by download URLs for SomeSoftware-1.2.3.zip and SomeSoftware-1.3.0.zip and you get different behaviour on hosts depending on if they downloaded version 1.2.3 before or after 1.3.0 was released.
The text was updated successfully, but these errors were encountered:
SUMMARY
There is currently no way to use win_get_url and be sure that the expected file is in place without doing extra HTTP requests that waste resources.
If using a checksum and force=true (which to me is a surprising default) the file is always re-downloaded, which if it is pointed to public download sources is inefficient and consumes other peoples resources for no good reason. If force=false a HTTP HEAD request with If-Modified-Since is done, but this is not always enough to ensure that the correct file is downloaded (the local file might have a later modification time than the file on the server).
ISSUE TYPE
COMPONENT NAME
win_get_url
ADDITIONAL INFORMATION
There are two ways in which the behaviour of the posix get_url module is better:
If win_get_url was changed to do these two things we could set force=false and be confident that the contents of dest is the file corresponding to the checksum.
This is obviously a contrived example, but replace dest with SomeSoftware.zip and the URLs by download URLs for SomeSoftware-1.2.3.zip and SomeSoftware-1.3.0.zip and you get different behaviour on hosts depending on if they downloaded version 1.2.3 before or after 1.3.0 was released.
The text was updated successfully, but these errors were encountered: