remote_file resource is it idempotent?

Hi,

i want to use the remote_file resource sunch that the client does not
download the file if file size is same, is there something extra i have to
do or remote_file is idempotent by default ?
I was looking at documentation, its confusing at some places it says
use_conditional_get , but again there are no examples on how to use it.

Thanks
Manoj

On Thursday, October 3, 2013 at 11:09 AM, Manoj Thakkar wrote:

Hi,

i want to use the remote_file resource sunch that the client does not download the file if file size is same, is there something extra i have to do or remote_file is idempotent by default ?
I was looking at documentation, its confusing at some places it says use_conditional_get , but again there are no examples on how to use it.

Thanks
Manoj

If you're on Chef 11.6.0+, and your HTTP server supports ETag and/or If-Modified-Since, Chef will handle use those HTTP features automatically to avoid unnecessary downloads.

If you're on an earlier version of Chef, or your HTTP server doesn't implement those cache control features, you need to provide a SHA2-256 checksum of the file in the resource's checksum attribute.

--
Daniel DeLeo