I'm trying to find a way to apply template resource dynamically on all files which are in a folder inside the cookbook's template folder. something like:
Dir.foreach("../templates/default/shared/") do | file | # This is the wrong line...
template "/home/admin/shared/#{file}" do
source "shared/#{file}"
…
end
end
how can I do it? I'm trying to avoid having a separate list of all the files in this directory as a variable... thanks.