meallhour meallhour - 1 year ago 123
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.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download