# new thirsty=yes|no parameter for the get\_url module, avoid downloading content each time

**URL:** <https://forum.ansible.com/t/new-thirsty-yes-no-parameter-for-the-get-url-module-avoid-downloading-content-each-time/11814>\
**Category:** Ansible Project\
**Created:** [August 20, 2012, 10:51pm UTC](https://forum.ansible.com/t/new-thirsty-yes-no-parameter-for-the-get-url-module-avoid-downloading-content-each-time/11814 "2012-08-20T22:51:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [August 20, 2012, 10:51pm UTC](https://forum.ansible.com/t/new-thirsty-yes-no-parameter-for-the-get-url-module-avoid-downloading-content-each-time/11814/1 "2012-08-20T22:51:10Z")

</div>

The get\_url module is used for a variety of things, like downloading  
small files or packages from local servers -- or large things, like  
downloading ISOs.

Previously this would download the contents of the remote location  
every single time and then replace if the file would need to change,  
thus idempotently (that word again, grr) replacing the module. That's  
good of course. However, you may not always want to download that  
file -- it's bad if you are pulling an ISO or hitting the public  
internet (which you don't want to do any sort of production capacity  
anyway, so don't do that).

I've updated it such that the default is a new mode "thirsty=no".  
Thirsty=no means it won't download the file if the destination already  
has a file there. Thirsty=yes means download every time and replace  
when things change. If thirsty=no, the dest must also be a fully  
qualified filename, not a directory name.

Module documentation is updated on the web site.

--Michael

---

<div class="post-metadata">

**Author:** ![jpmens1](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jpmens1](https://forum.ansible.com/u/jpmens1)\
**Post date:** [August 21, 2012, 1:22pm UTC](https://forum.ansible.com/t/new-thirsty-yes-no-parameter-for-the-get-url-module-avoid-downloading-content-each-time/11814/2 "2012-08-21T13:22:22Z")

</div>

> Thirsty=no means it won't download the file if the destination already  
> has a file there.

I originally considered not downloading if the target existed but  
thought it a bit dangerous. Good that it's now configurable. Thank you.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-JP
