I have a cookbook; however , this cookbook has static path. I want the path should be taken dynamically at run time. Also, I have a csv that has different path details w.r.t to each node for 2000 servers. I want it should run for 2000 nodes dynamically taking the correct path for correct node.
Cookbook:: Folcpy
Recipe:: default
#Copyright:: 2020, The Authors, All Rights Reserved.
execute 'Folcpy' do
cwd 'C:\PROD_SERVER'
command 'xcopy /e e:\inetpub\CHEF_APP C:\PROD_SERVER\PROD /y'
end
execute 'stat' do
cwd 'C:\PROD_SERVER\PROD'
command 'svn status > c:\SVN_Report.txt'
end
These paths are specified in a csv along with IP
csv format is IP, Apppath, prod path, Comparepath
For eg values are 192.168.23.43 e:\inetpub\CHEF_APP C:\PROD_SERVER\PROD C:\PROD_SERVER'
Could you please suggest some way out ?