meallhour meallhour - 7 months ago 57
Ruby Question

Is remote_file Chef resource idempotent by default?

I want to ask if remote_file is idempotent by default.

In other words, can I use the remote_file resource such that the chef-client does not download the file if file size is same.

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.


Yes, use_etags and use_last_modified (use_conditional_get is a shortcut for both of those) are both enabled by default: