Using a simple template block, is there a way to copy all template files in a templates/default/SubDir/
(templates/default/SubDir/*
) to a single location (/tmp/
)?
Here is an example block:
template '/tmp/...' do
source 'default/SubDir/...'
owner node['attribute']['os_user']
group node['attribute']['os_group']
mode '0755'
end
EDIT: these are all xml files and I assume that I would not be adding the .erb
extension to the template files, as that would require me to mention each template file name so that i can revert them back to .xml (as apposed to recursively copying the templates to the server).
NOTE: If this is not supported, then is there any recommended approach requiring strait ruby code?
EDIT: I am going to try making an aray of template files and see if that would work if I were to copy the entire array to the node.