We are currently using remote_file with source as an array. This allows us to check multiple servers for the file we want, in case the primary server is down.
We want to log which source remote_file ended up downloading the file from. I assume the log resource would be used, but I'm not sure how to find out which one of the provided sources were used by remote_file.
Super simplified example
urlArray = ['google.com','reddit.com','stackexchange.com']
remote_file 'foo' do
source urlArray
notifies :write, 'Downloaded from: #{sourceUsed}', :immediate
end
log 'Downloaded from: #{sourceUsed}' do
action :nothing
end